Package com.ibm.icu.text
Class PluralRanges
- java.lang.Object
-
- com.ibm.icu.text.PluralRanges
-
- All Implemented Interfaces:
Freezable<PluralRanges>,Cloneable,Comparable<PluralRanges>
@Deprecated public final class PluralRanges extends Object implements Freezable<PluralRanges>, Comparable<PluralRanges>
Deprecated.This API is ICU internal only.Utility class for returning the plural category for a range of numbers, such as 1–5, so that appropriate messages can be chosen. The rules for determining this value vary widely across locales.
-
-
Constructor Summary
Constructors Constructor Description PluralRanges()Deprecated.This API is ICU internal only.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(PluralRules.StandardPluralCategories rangeStart, PluralRules.StandardPluralCategories rangeEnd, PluralRules.StandardPluralCategories result)Deprecated.This API is ICU internal only.PluralRangescloneAsThawed()Deprecated.This API is ICU internal only.intcompareTo(PluralRanges that)Deprecated.This API is ICU internal only.booleanequals(Object other)Deprecated.This API is ICU internal only.PluralRangesfreeze()Deprecated.This API is ICU internal only.PluralRules.StandardPluralCategoriesget(PluralRules.StandardPluralCategories start, PluralRules.StandardPluralCategories end)Deprecated.This API is ICU internal only.inthashCode()Deprecated.This API is ICU internal only.booleanisExplicit(PluralRules.StandardPluralCategories start, PluralRules.StandardPluralCategories end)Deprecated.This API is ICU internal only.booleanisExplicitlySet(PluralRules.StandardPluralCategories count)Deprecated.This API is ICU internal only.booleanisFrozen()Deprecated.This API is ICU internal only.StringtoString()Deprecated.This API is ICU internal only.
-
-
-
Constructor Detail
-
PluralRanges
@Deprecated public PluralRanges()
Deprecated.This API is ICU internal only.Constructor
-
-
Method Detail
-
add
@Deprecated public void add(PluralRules.StandardPluralCategories rangeStart, PluralRules.StandardPluralCategories rangeEnd, PluralRules.StandardPluralCategories result)
Deprecated.This API is ICU internal only.Internal method for building. If the start or end are null, it means everything of that type.- Parameters:
rangeStart- plural category for the start of the rangerangeEnd- plural category for the end of the rangeresult- the resulting plural category
-
get
@Deprecated public PluralRules.StandardPluralCategories get(PluralRules.StandardPluralCategories start, PluralRules.StandardPluralCategories end)
Deprecated.This API is ICU internal only.Returns the appropriate plural category for a range from start to end. If there is no available data, then 'end' is returned as an implicit value. (Such an implicit value can be tested for withisExplicit(com.ibm.icu.text.PluralRules.StandardPluralCategories, com.ibm.icu.text.PluralRules.StandardPluralCategories).)- Parameters:
start- plural category for the start of the rangeend- plural category for the end of the range- Returns:
- the resulting plural category, or 'end' if there is no data.
-
isExplicit
@Deprecated public boolean isExplicit(PluralRules.StandardPluralCategories start, PluralRules.StandardPluralCategories end)
Deprecated.This API is ICU internal only.Returns whether the appropriate plural category for a range from start to end is explicitly in the data (vs given an implicit value). See alsoget(com.ibm.icu.text.PluralRules.StandardPluralCategories, com.ibm.icu.text.PluralRules.StandardPluralCategories).- Parameters:
start- plural category for the start of the rangeend- plural category for the end of the range- Returns:
- whether the value for (start,end) is explicit or not.
-
isExplicitlySet
@Deprecated public boolean isExplicitlySet(PluralRules.StandardPluralCategories count)
Deprecated.This API is ICU internal only.Internal method to determines whether the StandardPluralCategories was explicitly used in any add statement.- Parameters:
count- plural category to test- Returns:
- true if set
-
equals
@Deprecated public boolean equals(Object other)
Deprecated.This API is ICU internal only.Compares this instance with the specified object and indicates if they are equal. In order to be equal,omust represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.The default implementation returns
trueonly ifthis == o. See Writing a correctequalsmethod if you intend implementing your ownequalsmethod.The general contract for the
equalsandObject.hashCode()methods is that ifequalsreturnstruefor any two objects, thenhashCode()must return the same value for these objects. This means that subclasses ofObjectusually override either both methods or neither of them.- Overrides:
equalsin classObject- Parameters:
other- the object to compare this instance with.- Returns:
trueif the specified object is equal to thisObject;falseotherwise.- See Also:
Object.hashCode()
-
hashCode
@Deprecated public int hashCode()
Deprecated.This API is ICU internal only.Returns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Overrides:
hashCodein classObject- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-
compareTo
@Deprecated public int compareTo(PluralRanges that)
Deprecated.This API is ICU internal only.Compares this object to the specified object to determine their relative order.- Specified by:
compareToin interfaceComparable<PluralRanges>- Parameters:
that- the object to compare to this instance.- Returns:
- a negative integer if this instance is less than
another; a positive integer if this instance is greater thananother; 0 if this instance has the same order asanother.
-
isFrozen
@Deprecated public boolean isFrozen()
Deprecated.This API is ICU internal only.Determines whether the object has been frozen or not.- Specified by:
isFrozenin interfaceFreezable<PluralRanges>
-
freeze
@Deprecated public PluralRanges freeze()
Deprecated.This API is ICU internal only.Freezes the object.- Specified by:
freezein interfaceFreezable<PluralRanges>- Returns:
- the object itself.
-
cloneAsThawed
@Deprecated public PluralRanges cloneAsThawed()
Deprecated.This API is ICU internal only.Provides for the clone operation. Any clone is initially unfrozen.- Specified by:
cloneAsThawedin interfaceFreezable<PluralRanges>
-
toString
@Deprecated public String toString()
Deprecated.This API is ICU internal only.Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toStringmethod if you intend implementing your owntoStringmethod.
-
-