Class ImmutableRuntimeSpec

  • All Implemented Interfaces:
    RuntimeSpec

    @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableRuntimeSpec
    extends Object
    implements RuntimeSpec
    Immutable implementation of RuntimeSpec.

    Use the builder to create immutable instances: new RuntimeSpec.Builder().

    • Method Detail

      • getVersion

        public String getVersion()
        Specified by:
        getVersion in interface RuntimeSpec
        Returns:
        The value of the version attribute
      • getProvider

        public String getProvider()
        Specified by:
        getProvider in interface RuntimeSpec
        Returns:
        The value of the provider attribute
      • getMetadata

        public com.google.common.collect.ImmutableMap<String,​String> getMetadata()
        Specified by:
        getMetadata in interface RuntimeSpec
        Returns:
        The value of the metadata attribute
      • getDependencies

        public com.google.common.collect.ImmutableSet<MavenArtifact> getDependencies()
        Specified by:
        getDependencies in interface RuntimeSpec
        Returns:
        The value of the dependencies attribute
      • withVersion

        public final ImmutableRuntimeSpec withVersion​(String value)
        Copy the current immutable object by setting a value for the version attribute. An equals check 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
      • withProvider

        public final ImmutableRuntimeSpec withProvider​(String value)
        Copy the current immutable object by setting a value for the provider attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for provider
        Returns:
        A modified copy of the this object
      • withApplicationClass

        public final ImmutableRuntimeSpec withApplicationClass​(String value)
        Copy the current immutable object by setting a value for the applicationClass attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for applicationClass
        Returns:
        A modified copy of the this object
      • withMetadata

        public final ImmutableRuntimeSpec withMetadata​(Map<String,​? extends String> entries)
        Copy the current immutable object by replacing the metadata map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the metadata map
        Returns:
        A modified copy of this object
      • withDependencies

        public final ImmutableRuntimeSpec withDependencies​(MavenArtifact... elements)
        Copy the current immutable object with elements that replace the content of dependencies.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withDependencies

        public final ImmutableRuntimeSpec withDependencies​(Iterable<? extends MavenArtifact> elements)
        Copy the current immutable object with elements that replace the content of dependencies. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of dependencies elements to set
        Returns:
        A modified copy of this object
      • withCapabilities

        public final ImmutableRuntimeSpec withCapabilities​(Map<String,​? extends CamelCapability> entries)
        Copy the current immutable object by replacing the capabilities map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        entries - The entries to be added to the capabilities map
        Returns:
        A modified copy of this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: version, provider, applicationClass, metadata, dependencies, capabilities.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableRuntimeSpec copyOf​(RuntimeSpec instance)
        Creates an immutable copy of a RuntimeSpec 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 RuntimeSpec instance