Record Class ViewMixin.Updater<V,P>
java.lang.Object
java.lang.Record
ch.ladestation.connectncharge.util.mvcbase.ViewMixin.Updater<V,P>
- Enclosing interface:
- ViewMixin<M,
C extends ControllerBase<M>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconverter
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theobservableValue
record component.final String
toString()
Returns a string representation of this record class.void
Registers an observer that will keep observableValue and GUI-Property in sync by applying the specified converter.
-
Constructor Details
-
Updater
Creates an instance of aUpdater
record class.- Parameters:
observableValue
- the value for theobservableValue
record componentconverter
- the value for theconverter
record component
-
-
Method Details
-
update
Registers an observer that will keep observableValue and GUI-Property in sync by applying the specified converter.- Parameters:
property
- GUI-Property that will be updated when observableValue changes
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
observableValue
Returns the value of theobservableValue
record component.- Returns:
- the value of the
observableValue
record component
-
converter
Returns the value of theconverter
record component.- Returns:
- the value of the
converter
record component
-