Methods Summary |
---|
public java.lang.Boolean | containCharacter(java.lang.Character character)
assert(character != null);
return (vocab.contains(character.toString())) ? true : false;
|
public boolean | containsAllCharacter(java.util.List charactersGuessed)
Character[] chars = inCharacters();
List<Character> tmpChars = Arrays.asList(chars);
return charactersGuessed.containsAll(tmpChars);
|
public java.lang.String | getHint() return this.hint;
|
public java.lang.String | getVocab() return this.vocab;
|
public java.lang.Character[] | inCharacters()
if (characters == null) {
char[] c = vocab.toCharArray();
characters = new Character[c.length];
for (int a=0; a< c.length; a++) {
characters[a] = Character.valueOf(c[a]);
}
}
return characters;
|
public static void | main(java.lang.String[] args)
Vocab v = new Vocab("JAVA", "a java word");
List<Character> list1= new ArrayList<Character>();
list1.add(new Character('J"));
list1.add(new Character('V"));
List<Character> list2 = new ArrayList<Character>();
list2.add(new Character('J"));
list2.add(new Character('V"));
list2.add(new Character('A"));
System.out.println(v.containsAllCharacter(list1));
System.out.println(v.containsAllCharacter(list2));
|