Class ImmutableTypeValidation

java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeValidation
All Implemented Interfaces:
Type, TypeValidation

@Generated(from="TypeValidation", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableTypeValidation extends Object implements TypeValidation
Immutable implementation of TypeValidation.

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

  • Method Details

    • typeName

      public TypeName typeName()
      Returns the type name.
      Specified by:
      typeName in interface Type
      Returns:
      the type name
    • validation

      public Validation validation()
      Returns the validation carried by this dummy type.
      Specified by:
      validation in interface TypeValidation
      Returns:
      the validation carried by this dummy type
    • withTypeName

      public final ImmutableTypeValidation withTypeName(TypeName value)
      Copy the current immutable object by setting a value for the typeName attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeName
      Returns:
      A modified copy or the this object
    • withValidation

      public final ImmutableTypeValidation withValidation(Validation value)
      Copy the current immutable object by setting a value for the validation attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for validation
      Returns:
      A modified copy or the this object
    • equals

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

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

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

      public static ImmutableTypeValidation.Builder builder()
      Creates a builder for ImmutableTypeValidation.
       ImmutableTypeValidation.builder()
          .typeName(dk.mada.jaxrs.model.types.TypeName) // required typeName
          .validation(dk.mada.jaxrs.model.Validation) // required validation
          .build();
       
      Returns:
      A new ImmutableTypeValidation builder