|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
public interface StringListInterface
An interface for an ordered, modifiable collection of strings.
StringCollection is an implementation
of the StringListInterface.
| Method Summary | |
|---|---|
abstract void |
add(java.lang.String string)
Add a string to the list. |
abstract void |
add(java.lang.String string,
int index)
Add a string to the list at a specific location. |
abstract void |
addItems(StaticStringListInterface strings)
Add multiple strings to a list. |
abstract java.lang.Object |
clone()
Clone the object. |
abstract void |
removeAll()
Remove all strings from the string list. |
abstract void |
removeAt(int start,
int n)
Delete multiple strings starting at a specified index. |
abstract java.lang.String |
removeStringAt(int index)
Delete a string at a specified index. |
abstract void |
setSize(int newSize)
Set the number of strings that are being held in this collection. |
abstract void |
setString(int index,
java.lang.String string)
Replace the string at the specified index with a new string. |
abstract void |
sort(boolean ascending)
Sorts the current collection in place in ascending/descending order using the built-in String comparison functions. |
abstract void |
sort(boolean ascending,
int start,
int end)
Sorts the current collection in place in ascending/descending order using the built-in String comparison functions. |
abstract void |
sort(com.sas.util.Comparator comparator)
Sorts the current collection in place in ascending/descending order using the built-in String comparison functions. |
abstract void |
sort(com.sas.util.Comparator comparator,
int start,
int end)
Sorts the current collection in place in ascending/descending order using the built-in String comparison functions. |
| Methods inherited from interface com.sas.collection.StaticStringListInterface |
|---|
equals, getIndex, getLastIndex, getString, getStringItems, getStringItems |
| Methods inherited from interface com.sas.util.Countable |
|---|
count |
| Methods inherited from interface com.sas.util.Enumerable |
|---|
getItems |
| Methods inherited from interface com.sas.collection.ContentsChangedSource |
|---|
addContentsChangedListener, removeContentsChangedListener |
| Method Detail |
|---|
void add(java.lang.String string)
string - a string to add to the end of this list.void addItems(StaticStringListInterface strings)
strings - a list of strings to add to the end of this list.
void add(java.lang.String string,
int index)
string - The string to insert into the list.index - The index where the string will be inserted. A call
of getString(index) will return the string after the call is completed.
java.lang.IndexOutOfBoundsException - if index
is not in the range [0..count()]void removeAll()
void removeAt(int start,
int n)
start - delete the string at this zero-based position.n - delete n strings from the list.
java.lang.IndexOutOfBoundsException - if start
or (start+count()-1) is not in the range [0..count()-1]java.lang.String removeStringAt(int index)
index - delete the string at this zero-based position
java.lang.IndexOutOfBoundsException - if the index
is not in the range [0..count()-1]removeAt(int, int)
void setString(int index,
java.lang.String string)
index - replace the string at this zero-based positionstring - The new string to put in the specified location
java.lang.IndexOutOfBoundsException - if the index
is not in the range [0..count()-1]void setSize(int newSize)
size - The new size of this collection.
java.lang.IndexOutOfBoundsException - if index is less than zero.
void sort(com.sas.util.Comparator comparator,
int start,
int end)
comparator - An instance of a subclass of Comparator which provides a
compare(Object,Object) function.start - the index of the first string in the range to sortend - the index of the last string in the range to sortComparatorvoid sort(com.sas.util.Comparator comparator)
comparator - An instance of a subclass of Comparator which provides a
compare(Object,Object) function.Comparator
void sort(boolean ascending,
int start,
int end)
ascending - if true, sort in ascending order, else in descending order.start - the index of the first string in the range to sortend - the index of the last string in the range to sortvoid sort(boolean ascending)
ascending - if true, sort in ascending order, else in descending order.
java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonableclone in interface StaticStringListInterfacejava.lang.CloneNotSupportedException - if the object could not be cloned.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||