Class Languages.LanguageSet

    • Constructor Summary

      Constructors 
      Constructor Description
      LanguageSet()
      Constructs a new instance for subclasses.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean contains​(java.lang.String language)
      Tests whether this instance contains the given value.
      static Languages.LanguageSet from​(java.util.Set<java.lang.String> languages)
      Gets a language set for the given languages.
      abstract java.lang.String getAny()
      Gets any of this instance's element.
      abstract boolean isEmpty()
      Tests whether this instance is empty.
      abstract boolean isSingleton()
      Tests whether this instance contains a single element.
      abstract Languages.LanguageSet restrictTo​(Languages.LanguageSet other)
      Returns an instance restricted to this instances and the given values'.
      • Methods inherited from class java.lang.Object

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

      • LanguageSet

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

      • from

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

        public abstract boolean contains​(java.lang.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 java.lang.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

        public abstract Languages.LanguageSet restrictTo​(Languages.LanguageSet other)
        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'.