Package docking
Record Class KbEnabledState
java.lang.Object
java.lang.Record
docking.KbEnabledState
- Record Components:
precedence
- the precedenceisValid
- true if validisEnabled
- true if enabled
public record KbEnabledState(KeyBindingPrecedence precedence, boolean isValid, boolean isEnabled)
extends Record
A class to track an action's precedence and enablement
-
Constructor Summary
ConstructorsConstructorDescriptionKbEnabledState
(KeyBindingPrecedence precedence, boolean isValid, boolean isEnabled) Creates an instance of aKbEnabledState
record class. -
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.boolean
Returns the value of theisEnabled
record component.boolean
isValid()
Returns the value of theisValid
record component.Returns the value of theprecedence
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
KbEnabledState
Creates an instance of aKbEnabledState
record class.- Parameters:
precedence
- the value for theprecedence
record componentisValid
- the value for theisValid
record componentisEnabled
- the value for theisEnabled
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
precedence
Returns the value of theprecedence
record component.- Returns:
- the value of the
precedence
record component
-
isValid
public boolean isValid()Returns the value of theisValid
record component.- Returns:
- the value of the
isValid
record component
-
isEnabled
public boolean isEnabled()Returns the value of theisEnabled
record component.- Returns:
- the value of the
isEnabled
record component
-