Class RuntimeDescription

    • Method Detail

      • repository

        public java.net.URI repository()
        Specified by:
        repository in interface RuntimeDescriptionType
        Returns:
        The repository to which this runtime belongs
      • archiveURI

        public java.net.URI archiveURI()
        Specified by:
        archiveURI in interface RuntimeDescriptionType
        Returns:
        A URI that can be used to fetch an archive of the runtime
      • tags

        public java.util.Set<java.lang.String> tags()
        Specified by:
        tags in interface RuntimeDescriptionType
        Returns:
        A set of arbitrary tags added to the runtime
      • withRepository

        public final RuntimeDescription withRepository​(java.net.URI value)
        Copy the current immutable object by setting a value for the repository attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for repository
        Returns:
        A modified copy of the this object
      • withVersion

        public final RuntimeDescription withVersion​(RuntimeVersion value)
        Copy the current immutable object by setting a value for the version attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for version
        Returns:
        A modified copy of the this object
      • withConfiguration

        public final RuntimeDescription withConfiguration​(RuntimeConfiguration value)
        Copy the current immutable object by setting a value for the configuration attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for configuration
        Returns:
        A modified copy of the this object
      • withPlatform

        public final RuntimeDescription withPlatform​(java.lang.String value)
        Copy the current immutable object by setting a value for the platform attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for platform
        Returns:
        A modified copy of the this object
      • withArchitecture

        public final RuntimeDescription withArchitecture​(java.lang.String value)
        Copy the current immutable object by setting a value for the architecture attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for architecture
        Returns:
        A modified copy of the this object
      • withArchiveURI

        public final RuntimeDescription withArchiveURI​(java.net.URI value)
        Copy the current immutable object by setting a value for the archiveURI attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for archiveURI
        Returns:
        A modified copy of the this object
      • withArchiveSize

        public final RuntimeDescription withArchiveSize​(long value)
        Copy the current immutable object by setting a value for the archiveSize attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for archiveSize
        Returns:
        A modified copy of the this object
      • withArchiveHash

        public final RuntimeDescription withArchiveHash​(RuntimeHash value)
        Copy the current immutable object by setting a value for the archiveHash attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for archiveHash
        Returns:
        A modified copy of the this object
      • withVm

        public final RuntimeDescription withVm​(java.lang.String value)
        Copy the current immutable object by setting a value for the vm attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for vm
        Returns:
        A modified copy of the this object
      • withBuild

        public final RuntimeDescription withBuild​(RuntimeBuild value)
        Copy the current immutable object by setting a present value for the optional build attribute.
        Parameters:
        value - The value for build
        Returns:
        A modified copy of this object
      • withBuild

        public final RuntimeDescription withBuild​(java.util.Optional<? extends RuntimeBuild> optional)
        Copy the current immutable object by setting an optional value for the build attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for build
        Returns:
        A modified copy of this object
      • withTags

        public final RuntimeDescription withTags​(java.lang.String... elements)
        Copy the current immutable object with elements that replace the content of tags.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withTags

        public final RuntimeDescription withTags​(java.lang.Iterable<java.lang.String> elements)
        Copy the current immutable object with elements that replace the content of tags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of tags elements to set
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(java.lang.Object another)
        This instance is equal to all instances of RuntimeDescription that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: repository, version, configuration, platform, architecture, archiveURI, archiveSize, archiveHash, vm, build, tags.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value RuntimeDescription with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • copyOf

        public static RuntimeDescription copyOf​(RuntimeDescriptionType instance)
        Creates an immutable copy of a RuntimeDescriptionType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable RuntimeDescription instance
      • builder

        public static RuntimeDescription.Builder builder()
        Creates a builder for RuntimeDescription.
         RuntimeDescription.builder()
            .setRepository(java.net.URI) // required repository
            .setVersion(com.io7m.coffeepick.runtime.RuntimeVersion) // required version
            .setConfiguration(com.io7m.coffeepick.runtime.RuntimeConfiguration) // required configuration
            .setPlatform(String) // required platform
            .setArchitecture(String) // required architecture
            .setArchiveURI(java.net.URI) // required archiveURI
            .setArchiveSize(long) // required archiveSize
            .setArchiveHash(com.io7m.coffeepick.runtime.RuntimeHash) // required archiveHash
            .setVm(String) // required vm
            .setBuild(RuntimeBuild) // optional build
            .addTags|addAllTags(String) // tags elements
            .build();
         
        Returns:
        A new RuntimeDescription builder