Package de.Keyle.MyPet.api.skill.skills
Record Class Pickup.State
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.skill.skills.Pickup.State
- Record Components:
active- whether the owner has switched pickup on
- All Implemented Interfaces:
SkillState
- Enclosing interface:
Pickup
Snapshot of the Pickup auto-toggle (persisted or live).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
State
public State(boolean active) Creates an instance of aStaterecord class.- Parameters:
active- the value for theactiverecord 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. All components in this record class are compared with '=='. -
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-