Record Class EnumOptions
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.field.part.EnumOptions
- Record Components:
isEnum
- true if the field is an enumvalues
- the list of enum values
Represents options for an enum field in a model.
-
Constructor Summary
ConstructorsConstructorDescriptionEnumOptions
(boolean isEnum, List<String> values) Unmodifiable constructor for EnumOptions. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the list of enum values.final int
hashCode()
Returns a hash code value for this object.boolean
isEnum()
Returns the value of theisEnum
record component.final String
toString()
Returns a string representation of this record class.values()
Safe, defensive accessor for values.
-
Constructor Details
-
EnumOptions
Unmodifiable constructor for EnumOptions.
-
-
Method Details
-
values
Safe, defensive accessor for values. -
getValues
Returns the list of enum values.- Returns:
- the list of enum values
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
isEnum
public boolean isEnum()Returns the value of theisEnum
record component.- Returns:
- the value of the
isEnum
record component
-