Package ch.njol.skript.util
Record Class Utils.WordEnding
java.lang.Object
java.lang.Record
ch.njol.skript.util.Utils.WordEnding
- Enclosing class:
Utils
-
Constructor Summary
ConstructorsModifierConstructorDescriptionWordEnding(String singular, String plural) protectedWordEnding(String singular, String plural, boolean isCompleteWord) Creates an instance of aWordEndingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanReturns the value of theisCompleteWordrecord component.plural()Returns the value of thepluralrecord component.singular()Returns the value of thesingularrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WordEnding
-
WordEnding
Creates an instance of aWordEndingrecord class.- Parameters:
singular- the value for thesingularrecord componentplural- the value for thepluralrecord componentisCompleteWord- the value for theisCompleteWordrecord component
-
-
Method Details
-
singular
Returns the value of thesingularrecord component.- Returns:
- the value of the
singularrecord component
-
plural
Returns the value of thepluralrecord component.- Returns:
- the value of the
pluralrecord component
-
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 '=='. -
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. -
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. -
isCompleteWord
public boolean isCompleteWord()Returns the value of theisCompleteWordrecord component.- Returns:
- the value of the
isCompleteWordrecord component
-