Record Class MechanicWrapper
java.lang.Object
java.lang.Record
org.yuemi.mmomechanics.api.skill.mechanic.MechanicWrapper
- Record Components:
mechanic- the mechanic action to runtargeter- the targeter determining where to apply the mechanicconditions- condition checks that targets must pass
public record MechanicWrapper(@NotNull Mechanic mechanic, @NotNull Targeter targeter, @NotNull Collection<Condition> conditions)
extends Record
A wrapper record holding a mechanic, its targeter, and conditional checks.
-
Constructor Summary
ConstructorsConstructorDescriptionMechanicWrapper(@NotNull Mechanic mechanic, @NotNull Targeter targeter, @NotNull Collection<Condition> conditions) Creates an instance of aMechanicWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<Condition> Returns the value of theconditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Mechanicmechanic()Returns the value of themechanicrecord component.@NotNull Targetertargeter()Returns the value of thetargeterrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MechanicWrapper
public MechanicWrapper(@NotNull @NotNull Mechanic mechanic, @NotNull @NotNull Targeter targeter, @NotNull @NotNull Collection<Condition> conditions) Creates an instance of aMechanicWrapperrecord class.- Parameters:
mechanic- the value for themechanicrecord componenttargeter- the value for thetargeterrecord componentconditions- the value for theconditionsrecord 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). -
mechanic
Returns the value of themechanicrecord component.- Returns:
- the value of the
mechanicrecord component
-
targeter
Returns the value of thetargeterrecord component.- Returns:
- the value of the
targeterrecord component
-
conditions
Returns the value of theconditionsrecord component.- Returns:
- the value of the
conditionsrecord component
-