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
ModifierConstructorDescriptionWordEnding
(String singular, String plural) protected
WordEnding
(String singular, String plural, boolean isCompleteWord) Creates an instance of aWordEnding
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisCompleteWord
record component.plural()
Returns the value of theplural
record component.singular()
Returns the value of thesingular
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
WordEnding
-
WordEnding
Creates an instance of aWordEnding
record class.- Parameters:
singular
- the value for thesingular
record componentplural
- the value for theplural
record componentisCompleteWord
- the value for theisCompleteWord
record component
-
-
Method Details
-
singular
Returns the value of thesingular
record component.- Returns:
- the value of the
singular
record component
-
plural
Returns the value of theplural
record component.- Returns:
- the value of the
plural
record 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 theisCompleteWord
record component.- Returns:
- the value of the
isCompleteWord
record component
-