Record Class PluralRule
java.lang.Object
java.lang.Record
dev.goldmensch.cldrplurals.PluralRule
public record PluralRule(Locale locale, Map<PluralCategory, Predicate<String>> cardinals, Map<PluralCategory, Predicate<String>> ordinals)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPluralRule
(Locale locale, Map<PluralCategory, Predicate<String>> cardinals, Map<PluralCategory, Predicate<String>> ordinals) Creates an instance of aPluralRule
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecardinals
record component.final boolean
Indicates whether some other object is "equal to" this one.findCardinal
(String number) findOrdinal
(String number) final int
hashCode()
Returns a hash code value for this object.locale()
Returns the value of thelocale
record component.ordinals()
Returns the value of theordinals
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PluralRule
public PluralRule(Locale locale, Map<PluralCategory, Predicate<String>> cardinals, Map<PluralCategory, Predicate<String>> ordinals) Creates an instance of aPluralRule
record class.- Parameters:
locale
- the value for thelocale
record componentcardinals
- the value for thecardinals
record componentordinals
- the value for theordinals
record component
-
-
Method Details
-
find
-
findCardinal
-
findOrdinal
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
locale
Returns the value of thelocale
record component.- Returns:
- the value of the
locale
record component
-
cardinals
Returns the value of thecardinals
record component.- Returns:
- the value of the
cardinals
record component
-
ordinals
Returns the value of theordinals
record component.- Returns:
- the value of the
ordinals
record component
-