public interface Collection
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object o)
Adds an element.
|
boolean |
isEmpty()
Checks if the collection contains elements.
|
Iterator |
iterator()
Returns an iterator over the elements in this collection.
|
boolean |
remove(Object o)
Removes one instance of the specified element.
|
int |
size()
Returns the number of elements in this collection.
|
Object[] |
toArray()
Returns an array containing all of the elements in this collection.
|
boolean add(Object o)
boolean isEmpty()
boolean remove(Object o)
o
- the element to be removedIterator iterator()
Object[] toArray()
int size()