Class ImmutableTaggedAddresses


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

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

    • Method Detail

      • getWan

        public java.lang.String getWan()
        Specified by:
        getWan in class TaggedAddresses
        Returns:
        The value of the wan attribute
      • getLan

        public java.util.Optional<java.lang.String> getLan()
        Specified by:
        getLan in class TaggedAddresses
        Returns:
        The value of the lan attribute
      • withWan

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

        public final ImmutableTaggedAddresses withLan​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional lan attribute.
        Parameters:
        value - The value for lan
        Returns:
        A modified copy of this object
      • withLan

        public final ImmutableTaggedAddresses withLan​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the lan attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for lan
        Returns:
        A modified copy of this object
      • equals

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

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

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