Enum Class CharSet

java.lang.Object
java.lang.Enum<CharSet>
org.refcodes.data.CharSet
All Implemented Interfaces:
Serializable, Comparable<CharSet>, Constable, org.refcodes.mixin.CharSetAccessor

public enum CharSet extends Enum<CharSet> implements org.refcodes.mixin.CharSetAccessor
Commonly used char sets.
  • Enum Constant Details

    • ALPHABETIC

      public static final CharSet ALPHABETIC
    • ALPHANUMERIC

      public static final CharSet ALPHANUMERIC
    • ARABIC_BASE64

      public static final CharSet ARABIC_BASE64
    • ASCII

      public static final CharSet ASCII
    • ASCII_SPECIAL

      public static final CharSet ASCII_SPECIAL
    • BASE64

      public static final CharSet BASE64
    • BASE64URL

      public static final CharSet BASE64URL
    • BINARY

      public static final CharSet BINARY
    • CLOSING_BRACES

      public static final CharSet CLOSING_BRACES
      Characters representing closing braces.
    • DECIMAL

      public static final CharSet DECIMAL
    • ENCODED_AS_NUMBER

      public static final CharSet ENCODED_AS_NUMBER
      No prefixing zeros allowed when encoding a value as a number (e.g. int).
    • END_OF_LINE

      public static final CharSet END_OF_LINE
    • END_OF_SENTENCE

      public static final CharSet END_OF_SENTENCE
      Declares the characters denoting an end of a sentence.
    • ESCAPE_SEQUENCES

      public static final CharSet ESCAPE_SEQUENCES
    • HEXADECIMAL

      public static final CharSet HEXADECIMAL
    • LINE_BREAK_MARKERS

      public static final CharSet LINE_BREAK_MARKERS
      When formatting texts, those chars can be used to identify a possible suitable end of line (when seeking for a position to do a line-break).
    • LOWER_CASE

      public static final CharSet LOWER_CASE
    • NUMERIC

      public static final CharSet NUMERIC
    • OCTAL

      public static final CharSet OCTAL
    • OPENING_BRACES

      public static final CharSet OPENING_BRACES
      Characters representing opening braces.
    • QUOTES

      public static final CharSet QUOTES
    • REGEX_SPECIAL_CHARS

      public static final CharSet REGEX_SPECIAL_CHARS
    • SPACE_MARKERS

      public static final CharSet SPACE_MARKERS
      When formatting texts, those chars can be used to identify a space between two words.
    • UPPER_CASE

      public static final CharSet UPPER_CASE
    • WHITE_SPACES

      public static final CharSet WHITE_SPACES
  • Method Details

    • values

      public static CharSet[] 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 CharSet 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
    • getCharSet

      public char[] getCharSet()
      Specified by:
      getCharSet in interface org.refcodes.mixin.CharSetAccessor
    • hasChar

      public boolean hasChar(char aChar)
      Checks for char.
      Parameters:
      aChar - the char
      Returns:
      true, if successful
    • toCharset

      public static CharSet toCharset(String aCharsetName)
      Returns the charset which's name matches the provided name, ignoring the case and the underscore ("_").
      Parameters:
      aCharsetName - The name of the charset.
      Returns:
      The according CharSet or null if none matched.