All Packages Class Hierarchy This Package Previous Next Index
Class rebelsky.fun.WordList
java.lang.Object
|
+----rebelsky.fun.WordList
- public class WordList
- extends Object
An extensible and ordered list of words, useful for word guessing
games (I guess).
Originally created as part of an exercise for Math/CS103.
Updated for CS152.
Copyright (c) 1998 Samuel A. Rebelsky. All rights reserved.
- Version:
- 1.1 of January 1998
- Author:
- Samuel A. Rebelsky
Constructor Index
- o
WordList()
- Create a word list with a default list of words.
- o
WordList(String[])
-
Set up the word list with a particular set of words.
Method Index
- o
addWord(String)
- Add a word to the list, using binary search.
- o
elements()
- Extract all the elements of the list.
Constructors
o
WordList
public WordList(String stuff[])
- Set up the word list with a particular set of words. All the
other constructors end up using this constructor.
o
WordList
public WordList()
- Create a word list with a default list of words.
Methods
o
addWord
public void addWord(String word) throws Exception
- Add a word to the list, using binary search.
- Throws: Exception
- When we can't determine where the word should go.
o
elements
public Enumeration elements()
- Extract all the elements of the list.
All Packages Class Hierarchy This Package Previous Next Index