Record Class EntityData.PatternGroup<Data>

java.lang.Object
java.lang.Record
org.skriptlang.skript.bukkit.entity.EntityData.PatternGroup<Data>
Type Parameters:
Data - The object for representing a state of the entity.
Record Components:
isDefault - Whether this group should be the default group.
index - The index of the entity/this EntityData.PatternGroup.
name - The name of the entity.
data - The object representing a state of the entity. If null, will be marked as default group if no other group is marked with default.
patterns - The patterns that could be used to refer to the entity/this EntityData.PatternGroup.
Enclosing class:
EntityData<E extends org.bukkit.entity.Entity>

public static record EntityData.PatternGroup<Data>(boolean isDefault, int index, GeneralNoun name, Data data, String[] patterns) extends Record
Grouping of data for an entity that is to be parsed and retrieved.
  • Constructor Details

    • PatternGroup

      public PatternGroup(int index, GeneralNoun name, @Nullable Data data, String... patterns)
    • PatternGroup

      public PatternGroup(int index, GeneralNoun name, String... patterns)
    • PatternGroup

      public PatternGroup(boolean isDefault, int index, String name, @Nullable Data data, String... patterns)
    • PatternGroup

      public PatternGroup(int index, String name, @Nullable Data data, String... patterns)
    • PatternGroup

      public PatternGroup(int index, String name, String... patterns)
    • PatternGroup

      public PatternGroup(boolean isDefault, int index, GeneralNoun name, @Nullable Data data, String... patterns)
      Creates an instance of a PatternGroup record class.
      Parameters:
      isDefault - the value for the isDefault record component
      index - the value for the index record component
      name - the value for the name record component
      data - the value for the data record component
      patterns - the value for the patterns 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • isDefault

      public boolean isDefault()
      Returns the value of the isDefault record component.
      Returns:
      the value of the isDefault record component
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • name

      public GeneralNoun name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • data

      @Nullable public Data data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • patterns

      public String[] patterns()
      Returns the value of the patterns record component.
      Returns:
      the value of the patterns record component