Constructor Summary |
---|
CollectionBase()
Initializes a new instance of the CollectionBase class with the default initial capacity. |
CollectionBase(capacity)
Initializes a new instance of the CollectionBase class with the specified capacity. |
Method Summary | ||
---|---|---|
method | add(o) | |
Adds an item to the CollectionBase instance.
|
||
method | clear() | |
Removes all objects from the CollectionBase instance.
|
||
method | contains(o) | |
Return whether instance contains this object
|
||
method | get(index) | |
Get an item at specified position.
|
||
method | getCount() | |
Gets the number of elements contained in the CollectionBase instance.
|
||
method | indexOf(o) | |
Determines the index of a specific item in the CollectionBase instance.
|
||
method | iterator() | |
Returns an enumerator that iterates through the CollectionBase instance.
|
||
method | removeAt(index) | |
Removes the item at the specified index.
|
CollectionBase()
CollectionBase(capacity)
capacity: int
- The number of elements that the new list can initially store.Iterator iterator()
int getCount()
clear()
int add(o)
o: Object
- The Object to add to the CollectionBase instance.Object get(index)
index: int
- Specified position index.boolean contains(o)
o: Object
- test objectremoveAt(index)
index: int
- The zero-based index of the item to remove.int indexOf(o)
o: Object
- Determines the index of a specific item in the CollectionBase instance.