Record Class BooleanValue
java.lang.Object
java.lang.Record
org.microbean.attributes.BooleanValue
- Record Components:
value
- the value
- All Implemented Interfaces:
Comparable<BooleanValue>
,Constable
,Value<BooleanValue>
A
Value
whose value is a boolean
.- Author:
- Laird Nelson
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanValue
TheBooleanValue
representingfalse
.static final BooleanValue
TheBooleanValue
representingtrue
. -
Constructor Summary
ConstructorsConstructorDescriptionBooleanValue
(boolean value) Creates an instance of aBooleanValue
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
compareTo
(BooleanValue other) final Optional
<DynamicConstantDesc<BooleanValue>> 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 BooleanValue
of
(boolean b) Returns aBooleanValue
suitable for the supplied arguments.final String
toString()
Returns a string representation of this record class.boolean
value()
Returns the value of thevalue
record component.
-
Field Details
-
TRUE
TheBooleanValue
representingtrue
. -
FALSE
TheBooleanValue
representingfalse
.
-
-
Constructor Details
-
BooleanValue
Creates an instance of aBooleanValue
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BooleanValue>
-
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 with thecompare
method from their corresponding wrapper classes. -
hashCode
-
toString
-
of
Returns aBooleanValue
suitable for the supplied arguments. -
value
-