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 class
Builds instances of typeImmutableTypeValidation
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableTypeValidation
.static ImmutableTypeValidation
copyOf
(TypeValidation instance) Creates an immutable copy of aTypeValidation
value.boolean
This instance is equal to all instances ofImmutableTypeValidation
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:typeName
,validation
.toString()
Prints the immutable valueTypeValidation
with attribute values.typeName()
Returns the type name.Returns the validation carried by this dummy type.final ImmutableTypeValidation
withTypeName
(TypeName value) Copy the current immutable object by setting a value for thetypeName
attribute.final ImmutableTypeValidation
withValidation
(Validation value) Copy the current immutable object by setting a value for thevalidation
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface dk.mada.jaxrs.model.types.Type
isBigDecimal, isContainer, isDate, isDateTime, isDto, isEnum, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isVoid, neededImports, wrapperTypeName
Methods 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:
validation
in interfaceTypeValidation
- Returns:
- the validation carried by this dummy type
-
withTypeName
Copy the current immutable object by setting a value for thetypeName
attribute. 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
this
object
-
withValidation
Copy the current immutable object by setting a value for thevalidation
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableTypeValidation
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:typeName
,validation
. -
toString
Prints the immutable valueTypeValidation
with attribute values. -
copyOf
Creates an immutable copy of aTypeValidation
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
Creates a builder forImmutableTypeValidation
.ImmutableTypeValidation.builder() .typeName(dk.mada.jaxrs.model.types.TypeName) // required
typeName
.validation(dk.mada.jaxrs.model.Validation) // requiredvalidation
.build();- Returns:
- A new ImmutableTypeValidation builder
-