com.flagstone.transform.util.text
Class CharacterSet

java.lang.Object
  extended by com.flagstone.transform.util.text.CharacterSet

public final class CharacterSet
extends Object

CharacterSet is a convenience class for created a sorted list of characters that can be used to create a font definition.


Constructor Summary
CharacterSet()
           
 
Method Summary
 void add(char character)
          Add a character to the set of existing characters.
 void add(String text)
          Add all the characters in a string to the set of existing characters.
 List<Character> getCharacters()
          Get the sorted list of characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacterSet

public CharacterSet()
Method Detail

add

public void add(char character)
Add a character to the set of existing characters.

Parameters:
character - a character. If a character is already included then it is ignored.

add

public void add(String text)
Add all the characters in a string to the set of existing characters.

Parameters:
text - a string of characters. If any character is already included then it is ignored.

getCharacters

public List<Character> getCharacters()
Get the sorted list of characters.

Returns:
a list containing the characters in ascending order.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.