Class NamedCharacterSet

    • Method Detail

      • getName

        public String getName()
        Retrieves the name for this character set.
        Returns:
        The name for this character set.
      • getCharacters

        public char[] getCharacters()
        Retrieves the characters included in this character set.
        Returns:
        The characters included in this character set.
      • getRandomCharacter

        public char getRandomCharacter()
        Retrieves a character at random from this named character set.
        Returns:
        The randomly-selected character from this named character set;
      • getRandomCharacters

        public void getRandomCharacters​(StringBuilder buffer,
                                        int count)
        Appends the specified number of characters chosen at random from this character set to the provided buffer.
        Parameters:
        buffer - The buffer to which the characters should be appended.
        count - The number of characters to append to the provided buffer.
      • decodeCharacterSets

        public static NamedCharacterSet[] decodeCharacterSets​(SortedSet<String> values)
                                                       throws ConfigException
        Decodes the values of the provided configuration attribute as a set of character set definitions.
        Parameters:
        values - The set of encoded character set values to decode.
        Returns:
        The decoded character set definitions.
        Throws:
        ConfigException - If a problem occurs while attempting to decode the character set definitions.