Class CharSet

    • Field Detail

      • ALPHA

        public static final CharSet ALPHA
      • ALPHA_UPPER

        public static final CharSet ALPHA_UPPER
      • ALPHA_LOWER

        public static final CharSet ALPHA_LOWER
      • ALPHA_NUMERIC

        public static final CharSet ALPHA_NUMERIC
      • ALPHA_UPPER_NUMERIC

        public static final CharSet ALPHA_UPPER_NUMERIC
      • ALPHA_LOWER_NUMERIC

        public static final CharSet ALPHA_LOWER_NUMERIC
      • HEX_UPPER

        public static final CharSet HEX_UPPER
      • HEX_LOWER

        public static final CharSet HEX_LOWER
      • NUMERIC

        public static final CharSet NUMERIC
      • DOMAIN

        public static final CharSet DOMAIN
      • EMAIL_RESTRICTIVE

        public static final CharSet EMAIL_RESTRICTIVE
        allows only characters commonly used in email addresses; this is the same character set as previously available as CharSet.EMAIL; please note that valid characters like + and & are not allowed in this charset
      • EMAIL_ASCII

        public static final CharSet EMAIL_ASCII
        allows only 7bit ASCII email characters (RFC5322/5321 without quoted strings and comments)
      • EMAIL_INTERNATIONAL

        public static final CharSet EMAIL_INTERNATIONAL
        EMAIL_ASCII plus all characters beyond 7bit ASCII
    • Constructor Detail

      • CharSet

        public CharSet​(char from,
                       char to)
      • CharSet

        public CharSet​(char from1,
                       char to1,
                       char from2,
                       char to2)
      • CharSet

        public CharSet​(char from1,
                       char to1,
                       char from2,
                       char to2,
                       char from3,
                       char to3)
      • CharSet

        public CharSet​(char from1,
                       char to1,
                       char from2,
                       char to2,
                       char from3,
                       char to3,
                       char from4,
                       char to4)
      • CharSet

        public CharSet​(char from1,
                       char to1,
                       char from2,
                       char to2,
                       char from3,
                       char to3,
                       char from4,
                       char to4,
                       char from5,
                       char to5)
      • CharSet

        public CharSet​(char from1,
                       char to1,
                       char from2,
                       char to2,
                       char from3,
                       char to3,
                       char from4,
                       char to4,
                       char from5,
                       char to5,
                       char from6,
                       char to6)
    • Method Detail

      • isSubsetOfAscii

        public boolean isSubsetOfAscii()
      • contains

        public boolean contains​(char c)
      • indexOfNotContains

        public int indexOfNotContains​(String s)
        Returns the index of the first character in s, which this CharSet does not contain. Returns -1, if this CharSet contains all characters in s.

        This method is provided for binary backwards compatibility. It is equivalent to indexOfNotContains(CharSequence).

      • indexOfNotContains

        public int indexOfNotContains​(CharSequence s)
        Returns the index of the first character in s, which this CharSet does not contain. Returns -1, if this CharSet contains all characters in s.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • remove

        public CharSet remove​(char from,
                              char to)
      • getRegularExpression

        public String getRegularExpression()
      • getRegularExpressionForInvalid7BitChars

        public String getRegularExpressionForInvalid7BitChars()