|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList com.endeca.navigation.StringList
public class StringList
A StringList
object contains a list of String
s.
It is used to store a list of synonyms of a DimVal
object.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
StringList()
Default constructor that will contain an empty list. |
|
StringList(Collection c)
Constructor that takes a Collection of String s. |
Method Summary | |
---|---|
void |
add(String str)
Adds a String to the StringList list. |
Object |
get(int index)
Gets the element at position index . |
String |
getString(int index)
Gets a String from the StringList object. |
Object |
remove(int index)
Removes the element at the specified position in this list. |
int |
size()
Returns the number of elements in this list. |
String |
toString()
Generates the string-based representation of the list by returning a space-delimited sequence of String s. |
Methods inherited from class java.util.AbstractList |
---|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, set, subList, toArray, toArray |
Constructor Detail |
---|
public StringList()
public StringList(Collection c)
Collection
of String
s.
c
- A Collection
object from which the String
s will be extracted.Method Detail |
---|
public void add(String str)
String
to the StringList
list.
str
- A String
to add to the list.public String getString(int index)
String
from the StringList
object.
String
at position index
.public Object remove(int index)
remove
in interface List
remove
in class AbstractList
index
- The offset of the element in the list.
index
.
IndexOutOfBoundsException
- If the index is out of range.public Object get(int index)
index
. Object
returned is of type String
. Use of this method is not recommended
as object returned is of type String
.
Interface present for List
interface.
get
in interface List
get
in class AbstractList
index
- Offset of element.
index
.
IndexOutOfBoundsException
- If the index is out of range.public int size()
size
in interface Collection
size
in interface List
size
in class AbstractCollection
public String toString()
String
s.
toString
in class AbstractCollection
String
s.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |