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 aPluralRulerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecardinalsrecord component.final booleanIndicates whether some other object is "equal to" this one.findCardinal(String number) findOrdinal(String number) final inthashCode()Returns a hash code value for this object.locale()Returns the value of thelocalerecord component.ordinals()Returns the value of theordinalsrecord component.final StringtoString()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 aPluralRulerecord class.- Parameters:
locale- the value for thelocalerecord componentcardinals- the value for thecardinalsrecord componentordinals- the value for theordinalsrecord 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 thelocalerecord component.- Returns:
- the value of the
localerecord component
-
cardinals
Returns the value of thecardinalsrecord component.- Returns:
- the value of the
cardinalsrecord component
-
ordinals
Returns the value of theordinalsrecord component.- Returns:
- the value of the
ordinalsrecord component
-