Record Class ConstantValue<T>
java.lang.Object
java.lang.Record
dev.pfaff.altargui.util.listenable.ConstantValue<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Adds a listener.Adds a listener.<R> Value
<R> final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
ConstantValue
Creates an instance of aConstantValue
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
listen
Description copied from interface:Signal
Adds a listener. The listener may not be added again if already added. When added, it is guaranteed to be invoked immediately. -
listen
-
map
-
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)
. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-