Package dk.mada.jaxrs.model.types
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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableTypeValidation. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableTypeValidation.static ImmutableTypeValidationcopyOf(TypeValidation instance) Creates an immutable copy of aTypeValidationvalue.booleanThis instance is equal to all instances ofImmutableTypeValidationthat have equal attribute values.inthashCode()Computes a hash code from attributes:typeName,validation.toString()Prints the immutable valueTypeValidationwith attribute values.typeName()Returns the type name.Returns the validation carried by this dummy type.final ImmutableTypeValidationwithTypeName(TypeName value) Copy the current immutable object by setting a value for thetypeNameattribute.final ImmutableTypeValidationwithValidation(Validation value) Copy the current immutable object by setting a value for thevalidationattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dk.mada.jaxrs.model.types.Type
isBigDecimal, isContainer, isDate, isDateTime, isDto, isEnum, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isVoid, neededImports, wrapperTypeNameMethods inherited from interface dk.mada.jaxrs.model.types.TypeValidation
isValidation
-
Method Details
-
typeName
Returns the type name. -
validation
Returns the validation carried by this dummy type.- Specified by:
validationin interfaceTypeValidation- Returns:
- the validation carried by this dummy type
-
withTypeName
Copy the current immutable object by setting a value for thetypeNameattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for typeName- Returns:
- A modified copy or the
thisobject
-
withValidation
Copy the current immutable object by setting a value for thevalidationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for validation- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableTypeValidationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:typeName,validation. -
toString
Prints the immutable valueTypeValidationwith attribute values. -
copyOf
Creates an immutable copy of aTypeValidationvalue. 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
Creates a builder forImmutableTypeValidation.ImmutableTypeValidation.builder() .typeName(dk.mada.jaxrs.model.types.TypeName) // requiredtypeName.validation(dk.mada.jaxrs.model.Validation) // requiredvalidation.build();- Returns:
- A new ImmutableTypeValidation builder
-