Package com.vaadin.hilla.generator.model
Record Class EntityModel.Enumeration
java.lang.Object
java.lang.Record
com.vaadin.hilla.generator.model.EntityModel.Enumeration
- Record Components:
constants- the names of the constants, which are also the values they are serialized as
- All Implemented Interfaces:
EntityModel
- Enclosing interface:
EntityModel
public static record EntityModel.Enumeration(String javaClass, List<String> constants)
extends Record
implements EntityModel
A type whose values are one of a set of constants.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.hilla.generator.model.EntityModel
EntityModel.Bean, EntityModel.Builder, EntityModel.Discriminator, EntityModel.Enumeration -
Constructor Summary
ConstructorsConstructorDescriptionEnumeration(String javaClass, List<String> constants) Creates an instance of aEnumerationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstantsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thejavaClassrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Enumeration
Creates an instance of aEnumerationrecord class.- Parameters:
javaClass- the value for thejavaClassrecord componentconstants- the value for theconstantsrecord component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
javaClass
Returns the value of thejavaClassrecord component.- Specified by:
javaClassin interfaceEntityModel- Returns:
- the value of the
javaClassrecord component
-
constants
Returns the value of theconstantsrecord component.- Returns:
- the value of the
constantsrecord component
-