java.lang.Object
com.dna.jopt.member.unit.converter.openlocation.AbstractOpenLocation
com.dna.jopt.member.unit.converter.openlocation.OpenLocation

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class OpenLocation extends AbstractOpenLocation
Immutable implementation of AbstractOpenLocation.

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

  • Method Details

    • code

      public String code()
      Specified by:
      code in class AbstractOpenLocation
      Returns:
      The value of the code attribute
    • withCode

      public final OpenLocation withCode(String value)
      Copy the current immutable object by setting a value for the code attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for code
      Returns:
      A modified copy of the this object
    • equals

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

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

      public static OpenLocation of(String code)
      Construct a new immutable OpenLocation instance.
      Parameters:
      code - The value for the code attribute
      Returns:
      An immutable OpenLocation instance
    • copyOf

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

      public static OpenLocation.CodeBuildStage builder()
      Creates a builder for OpenLocation.
       OpenLocation.builder()
          .code(String) // required code
          .build();
       
      Returns:
      A new OpenLocation builder