Class ImmutableMember


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

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

    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in class Member
        Returns:
        The value of the name attribute
      • getAddress

        public java.lang.String getAddress()
        Specified by:
        getAddress in class Member
        Returns:
        The value of the address attribute
      • getPort

        public int getPort()
        Specified by:
        getPort in class Member
        Returns:
        The value of the port attribute
      • getTags

        public com.google.common.collect.ImmutableMap<java.lang.String,​java.lang.String> getTags()
        Specified by:
        getTags in class Member
        Returns:
        The value of the tags attribute
      • getStatus

        public int getStatus()
        Specified by:
        getStatus in class Member
        Returns:
        The value of the status attribute
      • getProtocolMin

        public int getProtocolMin()
        Specified by:
        getProtocolMin in class Member
        Returns:
        The value of the protocolMin attribute
      • getProtocolMax

        public int getProtocolMax()
        Specified by:
        getProtocolMax in class Member
        Returns:
        The value of the protocolMax attribute
      • getProtocolCur

        public int getProtocolCur()
        Specified by:
        getProtocolCur in class Member
        Returns:
        The value of the protocolCur attribute
      • getDelegateMin

        public int getDelegateMin()
        Specified by:
        getDelegateMin in class Member
        Returns:
        The value of the delegateMin attribute
      • getDelegateMax

        public int getDelegateMax()
        Specified by:
        getDelegateMax in class Member
        Returns:
        The value of the delegateMax attribute
      • getDelegateCur

        public int getDelegateCur()
        Specified by:
        getDelegateCur in class Member
        Returns:
        The value of the delegateCur attribute
      • withName

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

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

        public final ImmutableMember withPort​(int value)
        Copy the current immutable object by setting a value for the port attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for port
        Returns:
        A modified copy of the this object
      • withTags

        public final ImmutableMember withTags​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Copy the current immutable object by replacing the tags 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 tags map
        Returns:
        A modified copy of this object
      • withStatus

        public final ImmutableMember withStatus​(int value)
        Copy the current immutable object by setting a value for the status attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for status
        Returns:
        A modified copy of the this object
      • withProtocolMin

        public final ImmutableMember withProtocolMin​(int value)
        Copy the current immutable object by setting a value for the protocolMin attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for protocolMin
        Returns:
        A modified copy of the this object
      • withProtocolMax

        public final ImmutableMember withProtocolMax​(int value)
        Copy the current immutable object by setting a value for the protocolMax attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for protocolMax
        Returns:
        A modified copy of the this object
      • withProtocolCur

        public final ImmutableMember withProtocolCur​(int value)
        Copy the current immutable object by setting a value for the protocolCur attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for protocolCur
        Returns:
        A modified copy of the this object
      • withDelegateMin

        public final ImmutableMember withDelegateMin​(int value)
        Copy the current immutable object by setting a value for the delegateMin attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for delegateMin
        Returns:
        A modified copy of the this object
      • withDelegateMax

        public final ImmutableMember withDelegateMax​(int value)
        Copy the current immutable object by setting a value for the delegateMax attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for delegateMax
        Returns:
        A modified copy of the this object
      • withDelegateCur

        public final ImmutableMember withDelegateCur​(int value)
        Copy the current immutable object by setting a value for the delegateCur attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for delegateCur
        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 ImmutableMember 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: name, address, port, tags, status, protocolMin, protocolMax, protocolCur, delegateMin, delegateMax, delegateCur.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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