Enum Class Article

java.lang.Object
java.lang.Enum<Article>
com.sodius.oslc.server.core.nls.Article
All Implemented Interfaces:
Serializable, Comparable<Article>, java.lang.constant.Constable

public enum Article extends Enum<Article>
Defines an article that can be combined with a Term in sentences. This can for example render "the project" or "a project" depending on the chosen article.
Since:
4.0.0
  • Enum Constant Details

    • DEFINITE

      public static final Article DEFINITE
      Obtains a subject like like "the project" in English or "le projet" in French.
    • INDEFINITE

      public static final Article INDEFINITE
      Obtains a subject like like "a project" in English or "un projet" in French.
    • PARTITIVE

      public static final Article PARTITIVE
      Obtains a subject like like "the project" in English or "du projet" in French.
  • Method Details

    • values

      public static Article[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Article valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • singular

      public String singular(Term term)
      Returns the singular value for this article combined with the given term for preferred locales.
      Parameters:
      term - the term to combine with this article
      Returns:
      the singular value for preferred locales, e.g. "the project"
    • capitalizedSingular

      public String capitalizedSingular(Term term)
      Returns the capitalized singular value for this article combined with the given term for preferred locales.
      Parameters:
      term - the term to combine with this article
      Returns:
      the capitalized singular value for preferred locales, e.g. "The project"
    • plural

      public String plural(Term term)
      Returns the plural value for this article combined with the given term for preferred locales.
      Parameters:
      term - the term to combine with this article
      Returns:
      the plural value for preferred locales, e.g. "the projects"
    • capitalizedPlural

      public String capitalizedPlural(Term term)
      Returns the capitalized plural value for this article combined with the given term for preferred locales.
      Parameters:
      term - the term to combine with this article
      Returns:
      the capitalized plural value for preferred locales, e.g. "The projects"