Package dk.mada.jaxrs.model.types
Class ImmutableTypeSet
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeSet
- All Implemented Interfaces:
Type
,TypeContainer
,TypeSet
@Generated(from="TypeSet",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTypeSet
extends Object
implements TypeSet
Immutable implementation of
TypeSet
.
Use the builder to create immutable instances:
ImmutableTypeSet.builder()
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTypeSet.Builder
builder()
Creates a builder forImmutableTypeSet
.static ImmutableTypeSet
Creates an immutable copy of aTypeSet
value.boolean
This instance is equal to all instances ofImmutableTypeSet
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:innerType
,typeNames
.Returns the type of data in the container.toString()
Prints the immutable valueTypeSet
with attribute values.Returns the type names instance.final ImmutableTypeSet
withInnerType
(Type value) Copy the current immutable object by setting a value for theinnerType
attribute.final ImmutableTypeSet
withTypeNames
(TypeNames value) Copy the current immutable object by setting a value for thetypeNames
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, isDate, isDateTime, isDto, isEnum, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isValidation, isVoid, wrapperTypeName
Methods inherited from interface dk.mada.jaxrs.model.types.TypeContainer
isContainer, neededImports
Methods inherited from interface dk.mada.jaxrs.model.types.TypeSet
containerImplementation, typeName
-
Method Details
-
innerType
Returns the type of data in the container.- Specified by:
innerType
in interfaceTypeContainer
- Returns:
- the type of data in the container
-
typeNames
Returns the type names instance.- Specified by:
typeNames
in interfaceTypeContainer
- Returns:
- the type names instance
-
withInnerType
Copy the current immutable object by setting a value for theinnerType
attribute. 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
this
object
-
withTypeNames
Copy the current immutable object by setting a value for thetypeNames
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableTypeSet
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:innerType
,typeNames
. -
toString
Prints the immutable valueTypeSet
with attribute values. -
copyOf
Creates an immutable copy of aTypeSet
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 TypeSet instance
-
builder
Creates a builder forImmutableTypeSet
.ImmutableTypeSet.builder() .innerType(dk.mada.jaxrs.model.types.Type) // required
innerType
.typeNames(dk.mada.jaxrs.model.types.TypeNames) // requiredtypeNames
.build();- Returns:
- A new ImmutableTypeSet builder
-