public interface Collection
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.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(java.lang.Object o)
Removes one instance of the specified element.
|
int |
size()
Returns the number of elements in this collection.
|
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this collection.
|
boolean add(java.lang.Object o)
boolean isEmpty()
boolean remove(java.lang.Object o)
o
- the element to be removedIterator iterator()
java.lang.Object[] toArray()
int size()