Record Class EnumValue<E extends Enum<E>>
java.lang.Object
java.lang.Record
org.microbean.attributes.EnumValue<E>
- Type Parameters:
E
- the type of theEnum
- Record Components:
value
- the value
- All Implemented Interfaces:
Comparable<EnumValue<E>>
,Constable
,Value<EnumValue<E>>
public record EnumValue<E extends Enum<E>>(E extends Enum<E> value)
extends Record
implements Value<EnumValue<E>>
A
Value
whose value is an Enum
.- Author:
- Laird Nelson
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
final Optional
<DynamicConstantDesc<EnumValue<E>>> final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.of
(E e) Returns anEnumValue
suitable for the supplied arguments.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
EnumValue
Creates a newEnumValue
.- Parameters:
value
- the value; must not benull
- Throws:
NullPointerException
- ifvalue
isnull
-
-
Method Details
-
compareTo
-
describeConstable
- Specified by:
describeConstable
in interfaceConstable
-
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)
. -
hashCode
-
toString
-
of
-
value
-