Record Class LifestealerHeartDropRestrictionAction
java.lang.Object
java.lang.Record
dev.chicoferreira.lifestealer.restriction.LifestealerHeartDropRestrictionAction
- Record Components:
heartDropRestriction- the restrictionactionIfRestricted- the action to take if the restriction is met
public record LifestealerHeartDropRestrictionAction(LifestealerHeartDropRestriction heartDropRestriction, LifestealerHeartDropAction actionIfRestricted)
extends Record
A record that represents a restriction and the action to take if the restriction is met.
-
Constructor Summary
ConstructorsConstructorDescriptionLifestealerHeartDropRestrictionAction(LifestealerHeartDropRestriction heartDropRestriction, LifestealerHeartDropAction actionIfRestricted) Creates an instance of aLifestealerHeartDropRestrictionActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionIfRestrictedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheartDropRestrictionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LifestealerHeartDropRestrictionAction
public LifestealerHeartDropRestrictionAction(LifestealerHeartDropRestriction heartDropRestriction, LifestealerHeartDropAction actionIfRestricted) Creates an instance of aLifestealerHeartDropRestrictionActionrecord class.- Parameters:
heartDropRestriction- the value for theheartDropRestrictionrecord componentactionIfRestricted- the value for theactionIfRestrictedrecord 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 withObjects::equals(Object,Object). -
heartDropRestriction
Returns the value of theheartDropRestrictionrecord component.- Returns:
- the value of the
heartDropRestrictionrecord component
-
actionIfRestricted
Returns the value of theactionIfRestrictedrecord component.- Returns:
- the value of the
actionIfRestrictedrecord component
-