Package at.petrak.hexcasting.api.casting
Record Class ActionRegistryEntry
java.lang.Object
java.lang.Record
at.petrak.hexcasting.api.casting.ActionRegistryEntry
- Record Components:
prototype- The pattern associated with this action. The start dir acts as the "canonical" start direction for display in the book. For per-world patterns, the angle signature is the *shape* of the pattern but probably not the pattern itself.action- The action itself
public record ActionRegistryEntry(at.petrak.hexcasting.api.casting.math.HexPattern prototype, at.petrak.hexcasting.api.casting.castables.Action action)
extends Record
A bit of wrapper information around an action to go in the registry.
-
Constructor Summary
ConstructorsConstructorDescriptionActionRegistryEntry(at.petrak.hexcasting.api.casting.math.HexPattern prototype, at.petrak.hexcasting.api.casting.castables.Action action) Creates an instance of aActionRegistryEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionat.petrak.hexcasting.api.casting.castables.Actionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.at.petrak.hexcasting.api.casting.math.HexPatternReturns the value of theprototyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ActionRegistryEntry
public ActionRegistryEntry(at.petrak.hexcasting.api.casting.math.HexPattern prototype, at.petrak.hexcasting.api.casting.castables.Action action) Creates an instance of aActionRegistryEntryrecord class.
-
-
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). -
prototype
public at.petrak.hexcasting.api.casting.math.HexPattern prototype()Returns the value of theprototyperecord component.- Returns:
- the value of the
prototyperecord component
-
action
public at.petrak.hexcasting.api.casting.castables.Action action()Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-