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 intcompareTo(ClassValue other) final Optional<DynamicConstantDesc<ClassValue>> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static final ClassValueReturns aClassValuesuitable for the supplied arguments.final StringtoString()Returns a string representation of this record class.Class<?> value()Returns the value of thevaluerecord 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- ifvalueisnull
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<ClassValue>
-
describeConstable
- Specified by:
describeConstablein 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 aClassValuesuitable for the supplied arguments.- Parameters:
c- aClass; must not benull- Returns:
- a non-
nullClassValue - Throws:
NullPointerException- ifcisnull
-
value
-