Package dk.mada.jaxrs.model.types
Class ImmutableTypeArray
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeArray
- All Implemented Interfaces:
Type,TypeArray,TypeContainer
@Generated(from="TypeArray",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTypeArray
extends Object
implements TypeArray
Immutable implementation of
TypeArray.
Use the builder to create immutable instances:
ImmutableTypeArray.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTypeArray.Builderbuilder()Creates a builder forImmutableTypeArray.static ImmutableTypeArrayCreates an immutable copy of aTypeArrayvalue.booleanThis instance is equal to all instances ofImmutableTypeArraythat have equal attribute values.inthashCode()Computes a hash code from attributes:innerType,typeNames.Returns the type of data in the container.toString()Prints the immutable valueTypeArraywith attribute values.Returns the type names instance.final ImmutableTypeArraywithInnerType(Type value) Copy the current immutable object by setting a value for theinnerTypeattribute.final ImmutableTypeArraywithTypeNames(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.TypeArray
containerImplementation, containerImplementationDeclaration, typeNameMethods inherited from interface dk.mada.jaxrs.model.types.TypeContainer
isContainer, neededImports
-
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
-
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
-
equals
This instance is equal to all instances ofImmutableTypeArraythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:innerType,typeNames. -
toString
Prints the immutable valueTypeArraywith attribute values. -
copyOf
Creates an immutable copy of aTypeArrayvalue. 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 TypeArray instance
-
builder
Creates a builder forImmutableTypeArray.ImmutableTypeArray.builder() .innerType(dk.mada.jaxrs.model.types.Type) // requiredinnerType.typeNames(dk.mada.jaxrs.model.types.TypeNames) // requiredtypeNames.build();- Returns:
- A new ImmutableTypeArray builder
-