Module jonix.common

Enum Class TextCaseFlags

java.lang.Object
java.lang.Enum<TextCaseFlags>
com.tectonica.jonix.common.codelist.TextCaseFlags
All Implemented Interfaces:
OnixCodelist, Serializable, Comparable<TextCaseFlags>, Constable

public enum TextCaseFlags extends Enum<TextCaseFlags> implements OnixCodelist
Enum that corresponds to ONIX Codelist 14

Description: Text case flag

See Also:
  • Enum Constant Details

    • Undefined

      public static final TextCaseFlags Undefined
      Default
    • Sentence_case

      public static final TextCaseFlags Sentence_case
      Initial capitals on first word and subsequently on proper names only, eg 'The conquest of Mexico'
    • Title_case

      public static final TextCaseFlags Title_case
      Initial capitals on first word and subsequently on all significant words (nouns, pronouns, adjectives, verbs, adverbs, subordinate conjunctions) thereafter. Unless they appear as the first word, articles, prepositions and coordinating conjunctions remain lower case, eg 'The Conquest of Mexico'
    • All_capitals

      public static final TextCaseFlags All_capitals
      For example, 'THE CONQUEST OF MEXICO'. Use only when Sentence or Title case are not possible (for example because of system limitations). Do NOT use simply because title is (correctly) in all caps (eg 'BBQ USA')
  • Field Details

    • code

      public final String code
    • description

      public final String description
  • Method Details

    • values

      public static TextCaseFlags[] 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 TextCaseFlags 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
    • getCode

      public String getCode()
      Specified by:
      getCode in interface OnixCodelist
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface OnixCodelist
    • byCode

      public static TextCaseFlags byCode(String code)
    • byCodeOptional

      public static Optional<TextCaseFlags> byCodeOptional(String code)
    • codeToDesciption

      public static String codeToDesciption(String code)