|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsli.dialog.core.util.TermList
public class TermList
List of Terms. Note that this does NO error-checking!! If incoming string is an ill-formed term then result is unpredictable ... Author: Lawrence Cavedon, 3/03 7/21/03 : added the ability to parse quoted terms as units. Doesn't support nesting of quote (because there is only one quote character) and has no error checking.
| Field Summary | |
|---|---|
protected List |
terms
|
| Constructor Summary | |
|---|---|
TermList()
Default ctor. |
|
TermList(List termList)
Construct TermList from list of Term objects |
|
TermList(String string)
Constructs TermList from comma-separated list of terms |
|
TermList(Term term)
Deprecated. use TermList( A.list(term) ) instead |
|
TermList(Term term1,
Term term2)
Deprecated. use TermList( A.list(term1, term2) ) instead |
|
| Method Summary | |
|---|---|
void |
addTerm(int index,
Term term)
Insert a new term at the specified position |
void |
addTerm(Term term)
Insert a new term at the end |
Term |
getTerm(int n)
Return nth Term---indexing starts at 0. |
static void |
main(String[] params)
Simple test program ... |
protected String |
quotedTerm(String s)
|
void |
setTerm(int index,
Term term)
Replaces the term at the given positon with the new one |
int |
size()
|
protected String |
tillMatching(String string,
char openChar,
char closeChar)
|
String |
toString()
Convert this list of Terms to comma-separated string of term-strings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List terms
| Constructor Detail |
|---|
public TermList()
public TermList(String string)
public TermList(List termList)
public TermList(Term term)
public TermList(Term term1,
Term term2)
| Method Detail |
|---|
public int size()
public Term getTerm(int n)
public void addTerm(Term term)
public void addTerm(int index,
Term term)
public void setTerm(int index,
Term term)
index - term -
protected String tillMatching(String string,
char openChar,
char closeChar)
protected String quotedTerm(String s)
public String toString()
toString in class Object
public static void main(String[] params)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||