Class PluralRanges

  • All Implemented Interfaces:
    Freezable<PluralRanges>, java.lang.Cloneable, java.lang.Comparable<PluralRanges>

    @Deprecated
    public final class PluralRanges
    extends java.lang.Object
    implements Freezable<PluralRanges>, java.lang.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.
    Author:
    markdavis
    • 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
      void add​(com.ibm.icu.impl.StandardPlural rangeStart, com.ibm.icu.impl.StandardPlural rangeEnd, com.ibm.icu.impl.StandardPlural result)
      Deprecated.
      This API is ICU internal only.
      PluralRanges cloneAsThawed()
      Deprecated.
      This API is ICU internal only.
      int compareTo​(PluralRanges that)
      Deprecated.
      This API is ICU internal only.
      boolean equals​(java.lang.Object other)
      Deprecated.
      This API is ICU internal only.
      PluralRanges freeze()
      Deprecated.
      This API is ICU internal only.
      com.ibm.icu.impl.StandardPlural get​(com.ibm.icu.impl.StandardPlural start, com.ibm.icu.impl.StandardPlural end)
      Deprecated.
      This API is ICU internal only.
      int hashCode()
      Deprecated.
      This API is ICU internal only.
      boolean isExplicit​(com.ibm.icu.impl.StandardPlural start, com.ibm.icu.impl.StandardPlural end)
      Deprecated.
      This API is ICU internal only.
      boolean isExplicitlySet​(com.ibm.icu.impl.StandardPlural count)
      Deprecated.
      This API is ICU internal only.
      boolean isFrozen()
      Deprecated.
      This API is ICU internal only.
      java.lang.String toString()
      Deprecated.
      This API is ICU internal only.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PluralRanges

        @Deprecated
        public PluralRanges()
        Deprecated.
        This API is ICU internal only.
        Constructor
    • Method Detail

      • add

        @Deprecated
        public void add​(com.ibm.icu.impl.StandardPlural rangeStart,
                        com.ibm.icu.impl.StandardPlural rangeEnd,
                        com.ibm.icu.impl.StandardPlural 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 range
        rangeEnd - plural category for the end of the range
        result - the resulting plural category
      • get

        @Deprecated
        public com.ibm.icu.impl.StandardPlural get​(com.ibm.icu.impl.StandardPlural start,
                                                   com.ibm.icu.impl.StandardPlural 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 with isExplicit(com.ibm.icu.impl.StandardPlural, com.ibm.icu.impl.StandardPlural).)
        Parameters:
        start - plural category for the start of the range
        end - 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​(com.ibm.icu.impl.StandardPlural start,
                                  com.ibm.icu.impl.StandardPlural 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 also get(com.ibm.icu.impl.StandardPlural, com.ibm.icu.impl.StandardPlural).
        Parameters:
        start - plural category for the start of the range
        end - plural category for the end of the range
        Returns:
        whether the value for (start,end) is explicit or not.
      • isExplicitlySet

        @Deprecated
        public boolean isExplicitlySet​(com.ibm.icu.impl.StandardPlural 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​(java.lang.Object other)
        Deprecated.
        This API is ICU internal only.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        @Deprecated
        public int hashCode()
        Deprecated.
        This API is ICU internal only.
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        @Deprecated
        public int compareTo​(PluralRanges that)
        Deprecated.
        This API is ICU internal only.
        Specified by:
        compareTo in interface java.lang.Comparable<PluralRanges>
      • isFrozen

        @Deprecated
        public boolean isFrozen()
        Deprecated.
        This API is ICU internal only.
        Determines whether the object has been frozen or not.
        Specified by:
        isFrozen in interface Freezable<PluralRanges>
      • freeze

        @Deprecated
        public PluralRanges freeze()
        Deprecated.
        This API is ICU internal only.
        Freezes the object.
        Specified by:
        freeze in interface Freezable<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:
        cloneAsThawed in interface Freezable<PluralRanges>
      • toString

        @Deprecated
        public java.lang.String toString()
        Deprecated.
        This API is ICU internal only.
        Overrides:
        toString in class java.lang.Object