Class NumberFormatterFactory.PluralSelectorImpl

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PluralSelectorImpl​(java.util.Locale locale, PluralRules rules, java.util.Map<java.lang.String,​java.lang.Object> fixedOptions, java.lang.String kind)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean matches​(java.lang.Object value, java.lang.String key, java.util.Map<java.lang.String,​java.lang.Object> variableOptions)  
      java.util.List<java.lang.String> matches​(java.lang.Object value, java.util.List<java.lang.String> keys, java.util.Map<java.lang.String,​java.lang.Object> variableOptions)
      A method that is invoked for the object to match and each key.
      private static int pluralComparator​(java.lang.String o1, java.lang.String o2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PluralSelectorImpl

        private PluralSelectorImpl​(java.util.Locale locale,
                                   PluralRules rules,
                                   java.util.Map<java.lang.String,​java.lang.Object> fixedOptions,
                                   java.lang.String kind)
    • Method Detail

      • matches

        public java.util.List<java.lang.String> matches​(java.lang.Object value,
                                                        java.util.List<java.lang.String> keys,
                                                        java.util.Map<java.lang.String,​java.lang.Object> variableOptions)
        A method that is invoked for the object to match and each key.

        For example an English plural matches would return true for matches(1, "1"), matches(1, "one"), and matches(1, "*").

        Specified by:
        matches in interface Selector
        Parameters:
        value - the value to select on.
        keys - the key to test for matching.
        variableOptions - options that are not know at build time.
        Returns:
        the formatted string.
      • pluralComparator

        private static int pluralComparator​(java.lang.String o1,
                                            java.lang.String o2)
      • matches

        private boolean matches​(java.lang.Object value,
                                java.lang.String key,
                                java.util.Map<java.lang.String,​java.lang.Object> variableOptions)