|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.util.StringList
public class StringList
The StringList
is an immutable list of String
s.
Constructor Summary | |
---|---|
StringList(String... tokens)
Initializes the current instance. |
|
StringList(String singleToken)
Initializes the current instance. |
Method Summary | |
---|---|
boolean |
compareToIgnoreCase(StringList tokens)
Compares to tokens list and ignores the case of the tokens. |
boolean |
equals(Object obj)
|
String |
getToken(int index)
Retrieves a token from the given index. |
int |
hashCode()
|
Iterator<String> |
iterator()
Retrieves an Iterator over all Token s. |
int |
size()
Retrieves the number of tokens inside this list. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringList(String singleToken)
singleToken
- one single tokenpublic StringList(String... tokens)
tokens
- the string parts of the new StringList
, an empty
tokens array or null is not permitted.Method Detail |
---|
public String getToken(int index)
index
-
public int size()
public Iterator<String> iterator()
Iterator
over all Token
s.
iterator
in interface Iterable<String>
public boolean compareToIgnoreCase(StringList tokens)
tokens
-
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |