|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
public interface OrderedCollectionInterface
An ordered collection is a collection which accesses items via consecutive integer indices. These indices range from from 0 to n, where n=collection.count()-1.
An ordered colection supports insertion or deletion from anywhere in the collection.
| Method Summary | |
|---|---|
abstract void |
add(java.lang.Object item,
int index)
Insert an item into a specific location in this collection. |
abstract void |
addItems(java.util.Enumeration items,
int index)
Add all elements of an enumeration to this collection. |
abstract java.lang.Object |
clone()
Clone the object. |
abstract java.lang.Object |
removeAt(int index)
Remove from this collection the item at the specified index. |
abstract void |
set(int index,
java.lang.Object item)
Replace the item at the specified index with a new item. |
abstract void |
setSize(int newSize)
Set the number of items that are being held in this collection. |
| Methods inherited from interface com.sas.collection.CollectionInterface |
|---|
add, addItems, remove, removeAll, removeAll |
| Methods inherited from interface com.sas.collection.StaticOrderedCollectionInterface |
|---|
equals, getIndex, getItems, getLastIndex |
| Methods inherited from interface com.sas.collection.StaticCollectionInterface |
|---|
apply, contains |
| Methods inherited from interface com.sas.collection.ContentsChangedSource |
|---|
addContentsChangedListener, removeContentsChangedListener |
| Methods inherited from interface com.sas.beans.PropertyChangeSource |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.sas.util.Enumerable |
|---|
getItems |
| Methods inherited from interface com.sas.util.IndexedGetInterface |
|---|
get |
| Methods inherited from interface com.sas.util.Countable |
|---|
count |
| Methods inherited from interface com.sas.collection.Sortable |
|---|
sort, sort |
| Method Detail |
|---|
void add(java.lang.Object item,
int index)
item - the item to add to this collection.
The item may exist multiple times in this collection.index - Insert the object before the indexed item. The
newly inserted item can be accessed by get(index) afterwards.
java.lang.IndexOutOfBoundsException - if index
is not in the range [0, count()].
java.lang.ClassCastException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String).
void addItems(java.util.Enumeration items,
int index)
targetCollection.addItems(otherCollection.getItems())
items - an Enumeration of items to add to this collectionindex - Insert the objects starting before the item at index. The
first of the newly inserted item can be accessed by get(index)
afterwards.
java.lang.ClassCastException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String).java.lang.Object removeAt(int index)
index - the position of the item, zero-based indexing.
java.lang.IndexOutOfBoundsException - if index
is not in the range [0, count()-1].
void set(int index,
java.lang.Object item)
set in interface IndexedSetInterfaceindex - The position where the new item will be placed.item - The object to be added to this ordered collection
java.lang.IndexOutOfBoundsException - if index
is not in the range [0, count()-1].
java.lang.ClassCastException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String).void setSize(int newSize)
size - The new size of this collection
java.lang.IndexOutOfBoundsException - if size is less than zero.
java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface CollectionInterfaceclone in interface com.sas.PublicClonableclone in interface StaticCollectionInterfaceclone in interface StaticOrderedCollectionInterfacejava.lang.CloneNotSupportedException - if this collection cannot be cloned.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||