Class Languages.LanguageSet

java.lang.Object
org.apache.commons.codec.language.bm.Languages.LanguageSet
Direct Known Subclasses:
Languages.SomeLanguages
Enclosing class:
Languages

public abstract static class Languages.LanguageSet extends Object
A set of languages.
  • Constructor Details

    • LanguageSet

      public LanguageSet()
      Constructs a new instance for subclasses.
  • Method Details

    • from

      public static Languages.LanguageSet from(Set<String> languages)
      Gets a language set for the given languages.
      Parameters:
      languages - a language set.
      Returns:
      a LanguageSet.
    • contains

      public abstract boolean contains(String language)
      Tests whether this instance contains the given value.
      Parameters:
      language - the value to test.
      Returns:
      whether this instance contains the given value.
    • getAny

      public abstract String getAny()
      Gets any of this instance's element.
      Returns:
      any of this instance's element.
    • isEmpty

      public abstract boolean isEmpty()
      Tests whether this instance is empty.
      Returns:
      whether this instance is empty.
    • isSingleton

      public abstract boolean isSingleton()
      Tests whether this instance contains a single element.
      Returns:
      whether this instance contains a single element.
    • restrictTo

      Returns an instance restricted to this instances and the given values'.
      Parameters:
      other - The other instance.
      Returns:
      an instance restricted to this instances and the given values'.