Record Class Cooldown
java.lang.Object
java.lang.Record
net.flectone.pulse.model.util.Cooldown
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCooldown(boolean enable, long duration) Creates an instance of aCooldownrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongduration()Returns the value of thedurationrecord component.booleanenable()Returns the value of theenablerecord component.final booleanIndicates whether some other object is "equal to" this one.static Cooldownfinal inthashCode()Returns a hash code value for this object.toJson()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
Cooldown
public Cooldown(boolean enable, long duration) Creates an instance of aCooldownrecord class.- Parameters:
enable- the value for theenablerecord componentduration- the value for thedurationrecord component
-
-
Method Details
-
fromJson
-
toJson
-
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 with thecomparemethod from their corresponding wrapper classes. -
enable
public boolean enable()Returns the value of theenablerecord component.- Returns:
- the value of the
enablerecord component
-
duration
public long duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-