Record Class EnumConstant
java.lang.Object
java.lang.Record
io.kubfly.sdk.buffer.EnumConstant
- Record Components:
type- the type: the declaring class in Java (io.kubfly.ads.OrderStatus), the type name elsewhere; may be empty when the language has none at run timename- the name of the constant (SHIPPED)
- All Implemented Interfaces:
Serializable
An enum constant as the data holds it: its type and its name — never its ordinal, which changes when constants are
reordered. A reader has no class to make a constant of (the data may come from another language), so it keeps
both names;
toString() is type.name.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static EnumConstantThe constant of a Java enum.toString()The text form:type.name, or the name alone without a type.type()Returns the value of thetyperecord component.
-
Constructor Details
-
EnumConstant
Validates the components.- Parameters:
type- the typename- the name- Throws:
NullPointerException- if a component isnull
-
-
Method Details
-
of
The constant of a Java enum.- Parameters:
value- the constant- Returns:
- its type and name
-
toString
-
hashCode
-
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). -
type
-
name
-