Class ImmutableIpQualifier


@Generated(from="IpQualifier", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableIpQualifier extends IpQualifier
Immutable implementation of IpQualifier.

Use the builder to create immutable instances: ImmutableIpQualifier.builder(). Use the static factory method to create immutable instances: ImmutableIpQualifier.of().

  • Method Details

    • networkName

      public Optional<String> networkName()
      Optional network name.
      Specified by:
      networkName in class IpQualifier
    • type

      public QualifierType type()
      Description copied from class: Qualifier
      The qualifier type.
      Overrides:
      type in class IpQualifier
      Returns:
      The computed-at-construction value of the type attribute
    • withNetworkName

      public final ImmutableIpQualifier withNetworkName(String value)
      Copy the current immutable object by setting a present value for the optional networkName attribute.
      Parameters:
      value - The value for networkName
      Returns:
      A modified copy of this object
    • withNetworkName

      public final ImmutableIpQualifier withNetworkName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the networkName 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 networkName
      Returns:
      A modified copy of this object
    • equals

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

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

      public static ImmutableIpQualifier of(Optional<String> networkName)
      Construct a new immutable IpQualifier instance.
      Parameters:
      networkName - The value for the networkName attribute
      Returns:
      An immutable IpQualifier instance
    • copyOf

      public static ImmutableIpQualifier copyOf(IpQualifier instance)
      Creates an immutable copy of a IpQualifier 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 IpQualifier instance
    • builder

      public static ImmutableIpQualifier.Builder builder()
      Creates a builder for ImmutableIpQualifier.
       ImmutableIpQualifier.builder()
          .networkName(String) // optional networkName
          .build();
       
      Returns:
      A new ImmutableIpQualifier builder