Package ch.njol.skript.util
Record Class Utils.PluralResult
java.lang.Object
java.lang.Record
ch.njol.skript.util.Utils.PluralResult
- Record Components:
updated- The singular version of the passed word, if a single variant exists.plural- Whether the word is plural.
- Enclosing class:
Utils
Stores the result of
Utils.isPlural(String).-
Constructor Summary
ConstructorsConstructorDescriptionPluralResult(String updated, boolean plural) Creates an instance of aPluralResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanplural()Returns the value of thepluralrecord component.final StringtoString()Returns a string representation of this record class.updated()Returns the value of theupdatedrecord component.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
updated
Returns the value of theupdatedrecord component.- Returns:
- the value of the
updatedrecord component
-
plural
public boolean plural()Returns the value of thepluralrecord component.- Returns:
- the value of the
pluralrecord component
-