Record Class Utils.WordEnding

java.lang.Object
java.lang.Record
ch.njol.skript.util.Utils.WordEnding
Enclosing class:
Utils

protected static record Utils.WordEnding(String singular, String plural, boolean isCompleteWord) extends Record
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    WordEnding(String singular, String plural)
     
    protected
    WordEnding(String singular, String plural, boolean isCompleteWord)
    Creates an instance of a WordEnding record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isCompleteWord record component.
    Returns the value of the plural record component.
    Returns the value of the singular 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

    • WordEnding

      public WordEnding(String singular, String plural)
    • WordEnding

      protected WordEnding(String singular, String plural, boolean isCompleteWord)
      Creates an instance of a WordEnding record class.
      Parameters:
      singular - the value for the singular record component
      plural - the value for the plural record component
      isCompleteWord - the value for the isCompleteWord record component
  • Method Details

    • singular

      public String singular()
      Returns the value of the singular record component.
      Returns:
      the value of the singular record component
    • plural

      public String plural()
      Returns the value of the plural record component.
      Returns:
      the value of the plural record component
    • equals

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

      public 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
    • 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
    • isCompleteWord

      public boolean isCompleteWord()
      Returns the value of the isCompleteWord record component.
      Returns:
      the value of the isCompleteWord record component