Package dk.mada.jaxrs.model.types
Class ImmutableTypeEnum
java.lang.Object
dk.mada.jaxrs.model.types.ImmutableTypeEnum
@Generated(from="TypeEnum",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTypeEnum
extends Object
implements TypeEnum
Immutable implementation of
TypeEnum
.
Use the builder to create immutable instances:
ImmutableTypeEnum.builder()
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTypeEnum.Builder
builder()
Creates a builder forImmutableTypeEnum
.static ImmutableTypeEnum
Creates an immutable copy of aTypeEnum
value.boolean
This instance is equal to all instances ofImmutableTypeEnum
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:typeName
,innerType
,values
.Returns the inner type of the enumeration.toString()
Prints the immutable valueTypeEnum
with attribute values.typeName()
Returns the type name.values()
Returns the enumeration values.final ImmutableTypeEnum
withInnerType
(Type value) Copy the current immutable object by setting a value for theinnerType
attribute.final ImmutableTypeEnum
withTypeName
(TypeName value) Copy the current immutable object by setting a value for thetypeName
attribute.final ImmutableTypeEnum
withValues
(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofvalues
.final ImmutableTypeEnum
withValues
(String... elements) Copy the current immutable object with elements that replace the content ofvalues
.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, isPlainObject, isPrimitive, isPrimitive, isTime, isUUID, isValidation, isVoid, neededImports, wrapperTypeName
-
Method Details
-
typeName
Returns the type name. -
innerType
Returns the inner type of the enumeration. -
values
Returns the enumeration values. -
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
-
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
-
withValues
Copy the current immutable object with elements that replace the content ofvalues
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withValues
Copy the current immutable object with elements that replace the content ofvalues
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of values elements to set- Returns:
- A modified copy or
this
if not changed
-
equals
This instance is equal to all instances ofImmutableTypeEnum
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:typeName
,innerType
,values
. -
toString
Prints the immutable valueTypeEnum
with attribute values. -
copyOf
Creates an immutable copy of aTypeEnum
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 TypeEnum instance
-
builder
Creates a builder forImmutableTypeEnum
.ImmutableTypeEnum.builder() .typeName(dk.mada.jaxrs.model.types.TypeName) // required
typeName
.innerType(dk.mada.jaxrs.model.types.Type) // requiredinnerType
.addValues|addAllValues(String) //values
elements .build();- Returns:
- A new ImmutableTypeEnum builder
-