Class ImmutableConfig


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableConfig
    extends Config
    Immutable implementation of Config.

    Use the builder to create immutable instances: ImmutableConfig.builder().

    • Method Detail

      • getDatacenter

        public java.lang.String getDatacenter()
        Specified by:
        getDatacenter in class Config
        Returns:
        The value of the datacenter attribute
      • getNodeName

        public java.lang.String getNodeName()
        Specified by:
        getNodeName in class Config
        Returns:
        The value of the nodeName attribute
      • getRevision

        public java.lang.String getRevision()
        Specified by:
        getRevision in class Config
        Returns:
        The value of the revision attribute
      • getServer

        public boolean getServer()
        Specified by:
        getServer in class Config
        Returns:
        The value of the server attribute
      • getVersion

        public java.lang.String getVersion()
        Specified by:
        getVersion in class Config
        Returns:
        The value of the version attribute
      • withDatacenter

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

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

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

        public final ImmutableConfig withServer​(boolean value)
        Copy the current immutable object by setting a value for the server attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for server
        Returns:
        A modified copy of the this object
      • withVersion

        public final ImmutableConfig withVersion​(java.lang.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
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableConfig 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: datacenter, nodeName, revision, server, version.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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