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 aLifestealerHeartDropRestrictionAction
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionIfRestricted
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 theheartDropRestriction
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LifestealerHeartDropRestrictionAction
public LifestealerHeartDropRestrictionAction(LifestealerHeartDropRestriction heartDropRestriction, LifestealerHeartDropAction actionIfRestricted) Creates an instance of aLifestealerHeartDropRestrictionAction
record class.- Parameters:
heartDropRestriction
- the value for theheartDropRestriction
record componentactionIfRestricted
- the value for theactionIfRestricted
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
heartDropRestriction
Returns the value of theheartDropRestriction
record component.- Returns:
- the value of the
heartDropRestriction
record component
-
actionIfRestricted
Returns the value of theactionIfRestricted
record component.- Returns:
- the value of the
actionIfRestricted
record component
-