Class UpdatablePackage

  • All Implemented Interfaces:
    java.lang.Comparable<UpdatablePackage>

    public class UpdatablePackage
    extends java.lang.Object
    implements java.lang.Comparable<UpdatablePackage>
    Represents a (revisionless) package, either local, remote, or both. If both a local and remote package are specified, they should represent exactly the same package, excepting the revision. That is, the result of installing the remote package should be (a possibly updated version of) the local package.
    • Constructor Detail

      • UpdatablePackage

        public UpdatablePackage​(@NonNull
                                LocalPackage localPackage)
      • UpdatablePackage

        public UpdatablePackage​(@NonNull
                                RemotePackage remotePackage)
    • Method Detail

      • setRemote

        public void setRemote​(@NonNull
                              RemotePackage remote)
        Sets the remote package for this UpdatablePackage.
      • hasRemote

        public boolean hasRemote()
      • hasLocal

        public boolean hasLocal()
      • getRepresentative

        @NonNull
        public RepoPackage getRepresentative()
        Gets a RepoPackage (either local or remote) corresponding to this updatable package. This will be the local package if there is one, and the remote otherwise.
      • isUpdate

        public boolean isUpdate()
        Returns:
        true if this package is installed and a newer version is available.
      • getPath

        public java.lang.String getPath()
        Returns:
        The path of the local and/or remote package.