Record Class ClassValue
java.lang.Object
java.lang.Record
org.microbean.attributes.ClassValue
- Record Components:
value
- the value
- All Implemented Interfaces:
Comparable<ClassValue>
,Constable
,Value<ClassValue>
A
Value
whose value is a Class
.- Author:
- Laird Nelson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
compareTo
(ClassValue other) final Optional
<DynamicConstantDesc<ClassValue>> final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static final ClassValue
Returns aClassValue
suitable for the supplied arguments.final String
toString()
Returns a string representation of this record class.Class
<?> value()
Returns the value of thevalue
record component.
-
Field Details
-
CLASS_JAVA_LANG_OBJECT
-
CLASS_JAVA_LANG_STRING
-
-
Constructor Details
-
ClassValue
Creates a newClassValue
.- Parameters:
value
- the value; must not benull
- Throws:
NullPointerException
- ifvalue
isnull
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ClassValue>
-
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
Returns aClassValue
suitable for the supplied arguments.- Parameters:
c
- aClass
; must not benull
- Returns:
- a non-
null
ClassValue
- Throws:
NullPointerException
- ifc
isnull
-
value
-