|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdanbikel.parser.WordListFactory
public class WordListFactory
Provides methods to create new WordList
objects. Depending
on the size given, different implementations of the WordList
interface are returned by the factory methods.
Method Summary | |
---|---|
static WordList |
newList(Collection c)
Returns a new WordList object containing the words of the
specified collection. |
static WordList |
newList(int size)
Returns a new WordList object of the specified size. |
static WordList |
newList(SexpList list)
Returns a new WordList object containing Word
objects constructed from the elements of the specified list, using the
Word.Word(Sexp) constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static WordList newList(int size)
WordList
object of the specified size.
Different WordList
implementations are returned depending
on whether the size is 1 or greater than 1. If the
size is 0, a xanonical empty word list object is returned.
WordList
object of the specified sizepublic static WordList newList(SexpList list)
WordList
object containing Word
objects constructed from the elements of the specified list, using the
Word.Word(Sexp)
constructor. Different WordList
implementations are returned depending on whether the size of the
specified list is 1 or greater than 1. If the size is
0, a canonical empty word list object is returned.
WordList
object of the specified sizepublic static WordList newList(Collection c)
WordList
object containing the words of the
specified collection. Different WordList
implementations
are returned depending on whether the size of the specified collection
is 1 or greater than 1. If the size is 0, a
canonical empty word list object is returned.
WordList
object of the specified size
ClassCastException
- if any of the objects in the specified
collection are not instances of Word
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |