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.Builderbuilder()Creates a builder forImmutableTypeEnum.static ImmutableTypeEnumCreates an immutable copy of aTypeEnumvalue.booleanThis instance is equal to all instances ofImmutableTypeEnumthat have equal attribute values.inthashCode()Computes a hash code from attributes:typeName,innerType,values.Returns the inner type of the enumeration.toString()Prints the immutable valueTypeEnumwith attribute values.typeName()Returns the type name.values()Returns the enumeration values.final ImmutableTypeEnumwithInnerType(Type value) Copy the current immutable object by setting a value for theinnerTypeattribute.final ImmutableTypeEnumwithTypeName(TypeName value) Copy the current immutable object by setting a value for thetypeNameattribute.final ImmutableTypeEnumwithValues(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofvalues.final ImmutableTypeEnumwithValues(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, waitMethods 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 thetypeNameattribute. 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
thisobject
-
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
-
withValues
Copy the current immutable object with elements that replace the content ofvalues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
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
thisif not changed
-
equals
This instance is equal to all instances ofImmutableTypeEnumthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:typeName,innerType,values. -
toString
Prints the immutable valueTypeEnumwith attribute values. -
copyOf
Creates an immutable copy of aTypeEnumvalue. 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) // requiredtypeName.innerType(dk.mada.jaxrs.model.types.Type) // requiredinnerType.addValues|addAllValues(String) //valueselements .build();- Returns:
- A new ImmutableTypeEnum builder
-