Package dk.mada.jaxrs.model.types
Class ImmutableTypeMap
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeMap
- All Implemented Interfaces:
Type,TypeContainer,TypeMap
@Generated(from="TypeMap",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTypeMap
extends Object
implements TypeMap
Immutable implementation of
TypeMap.
Use the builder to create immutable instances:
ImmutableTypeMap.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTypeMap.Builderbuilder()Creates a builder forImmutableTypeMap.static ImmutableTypeMapCreates an immutable copy of aTypeMapvalue.booleanThis instance is equal to all instances ofImmutableTypeMapthat have equal attribute values.inthashCode()Computes a hash code from attributes:innerType,typeNames,isFreeFormObject.Returns the type of data in the container.booleanReturns true if this is a free-from object.toString()Prints the immutable valueTypeMapwith attribute values.Returns the type names instance.final ImmutableTypeMapwithInnerType(Type value) Copy the current immutable object by setting a value for theinnerTypeattribute.final ImmutableTypeMapwithIsFreeFormObject(boolean value) Copy the current immutable object by setting a value for theisFreeFormObjectattribute.final ImmutableTypeMapwithTypeNames(TypeNames value) Copy the current immutable object by setting a value for thetypeNamesattribute.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, isDate, isDateTime, isDto, isEnum, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isValidation, isVoid, wrapperTypeNameMethods inherited from interface dk.mada.jaxrs.model.types.TypeContainer
isContainer, neededImportsMethods inherited from interface dk.mada.jaxrs.model.types.TypeMap
containerImplementation, containerImplementationDeclaration, typeName
-
Method Details
-
innerType
Returns the type of data in the container.- Specified by:
innerTypein interfaceTypeContainer- Returns:
- the type of data in the container
-
typeNames
Returns the type names instance.- Specified by:
typeNamesin interfaceTypeContainer- Returns:
- the type names instance
-
isFreeFormObject
public boolean isFreeFormObject()Returns true if this is a free-from object.- Specified by:
isFreeFormObjectin interfaceTypeMap- Returns:
- true if this is a free-from object
-
withInnerType
Copy the current immutable object by setting a value for theinnerTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for innerType- Returns:
- A modified copy or the
thisobject
-
withTypeNames
Copy the current immutable object by setting a value for thetypeNamesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for typeNames- Returns:
- A modified copy or the
thisobject
-
withIsFreeFormObject
Copy the current immutable object by setting a value for theisFreeFormObjectattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isFreeFormObject- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableTypeMapthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:innerType,typeNames,isFreeFormObject. -
toString
Prints the immutable valueTypeMapwith attribute values. -
copyOf
Creates an immutable copy of aTypeMapvalue. 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 TypeMap instance
-
builder
Creates a builder forImmutableTypeMap.ImmutableTypeMap.builder() .innerType(dk.mada.jaxrs.model.types.Type) // requiredinnerType.typeNames(dk.mada.jaxrs.model.types.TypeNames) // requiredtypeNames.isFreeFormObject(boolean) // requiredisFreeFormObject.build();- Returns:
- A new ImmutableTypeMap builder
-