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

    Constructors
    Constructor
    Description
    ActionRegistryEntry(at.petrak.hexcasting.api.casting.math.HexPattern prototype, at.petrak.hexcasting.api.casting.castables.Action action)
    Creates an instance of a ActionRegistryEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    at.petrak.hexcasting.api.casting.castables.Action
    Returns the value of the action record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    at.petrak.hexcasting.api.casting.math.HexPattern
    Returns the value of the prototype record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a ActionRegistryEntry record class.
      Parameters:
      prototype - the value for the prototype record component
      action - the value for the action record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • prototype

      public at.petrak.hexcasting.api.casting.math.HexPattern prototype()
      Returns the value of the prototype record component.
      Returns:
      the value of the prototype record component
    • action

      public at.petrak.hexcasting.api.casting.castables.Action action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component