Enum CharSet

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

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

    • ASCII

      public static final CharSet ASCII
    • ASCII_SPECIAL

      public static final CharSet ASCII_SPECIAL
    • ALPHABETIC

      public static final CharSet ALPHABETIC
    • UPPER_CASE

      public static final CharSet UPPER_CASE
    • LOWER_CASE

      public static final CharSet LOWER_CASE
    • ALPHANUMERIC

      public static final CharSet ALPHANUMERIC
    • NUMERIC

      public static final CharSet NUMERIC
    • ENCODED_AS_NUMBER

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

      public static final CharSet BINARY
    • OCTAL

      public static final CharSet OCTAL
    • DECIMAL

      public static final CharSet DECIMAL
    • HEXADECIMAL

      public static final CharSet HEXADECIMAL
    • BASE64

      public static final CharSet BASE64
    • BASE64URL

      public static final CharSet BASE64URL
    • ARABIC_BASE64

      public static final CharSet ARABIC_BASE64
    • QUOTES

      public static final CharSet QUOTES
    • WHITE_SPACES

      public static final CharSet WHITE_SPACES
    • ESCAPE_SEQUENCES

      public static final CharSet ESCAPE_SEQUENCES
    • END_OF_LINE

      public static final CharSet END_OF_LINE
    • 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).
    • OPENING_BRACES

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

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

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

      public static final CharSet REGEX_SPECIAL_CHARS
  • Method Details

    • values

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

      public static CharSet valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.