Interface Selector


@Deprecated public interface Selector
Deprecated.
This API is for technology preview only.
The interface that must be implemented by all selectors that can be used from MessageFormatter.

Selectors are used to choose between different message variants, similar to plural, selectordinal, and select in MessageFormat.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(Object value, String key, Map<String,Object> variableOptions)
    Deprecated.
    This API is for technology preview only.
  • Method Details

    • matches

      @Deprecated boolean matches(Object value, String key, Map<String,Object> variableOptions)
      Deprecated.
      This API is for technology preview only.
      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, "*").

      Parameters:
      value - the value to select on.
      key - the key to test for matching.
      variableOptions - options that are not know at build time.
      Returns:
      the formatted string.