public class AlphaBar
extends java.lang.Object
Map<Character, Integer> charset = new HashMap<Character, Integer>(); charset.add(new Character('A')); charset.add(new Character('M')); charset.add(new Character('Z')); charset.add(new Character('5')); AlphaBar ab = new AlphaBar("{0}* ", "{0} "); System.out.println(ab.getAlphaList(charset));produces the following output: A* B C D E F G H I J K L M* N O P Q R S T U V W X Y Z* 1 2 3 4 5* 6 7 8 9 0 With each letter highlighted with an * indicating its contained within the set
Constructor and Description |
---|
AlphaBar(java.lang.String charEnabledIn,
java.lang.String charDisabledIn)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAlphaList(java.util.Map<java.lang.Character,java.lang.Integer> charsEnabled)
get the alphabetical list of enabled and disabled
elements in the alphabet.
|
public AlphaBar(java.lang.String charEnabledIn, java.lang.String charDisabledIn)
charEnabledIn
- the MessageFormat style textcharDisabledIn
- the MessageFormat style textpublic java.lang.String getAlphaList(java.util.Map<java.lang.Character,java.lang.Integer> charsEnabled)
charsEnabled
- the set of characters that are
contained within the listview.