Class ImmutableCamelCapability

  • All Implemented Interfaces:
    CamelCapability

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

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

    • Method Detail

      • withDependencies

        public final ImmutableCamelCapability withDependencies​(Artifact... 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 ImmutableCamelCapability withDependencies​(Iterable<? extends Artifact> 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
      • equals

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

        public int hashCode()
        Returns a constant hash code value.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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