| contains(Object o) |
returns true if the collection contains the specified element |
| isEmpty() |
returns true if the collection has no elements |
| iterator() |
returns an Iterator object.
There is no guarantee as to the order of the returned elements unless the collection is an instance of a class that guarantees the order. |
| size() |
returns the number of elements in the collection or Integer.MAX_VALUE if the collection equals or exceeds Integer.MAX_VALUE |
| toArray() |
returns the collection elements as an array.
If the collection class guarantees an order, the array elements are in the guaranteed order. |
| toArray(Object a[]) |
returns all the elements in the collection whose type is that of the array type.
If the collection does not fit in the array, a new array of the same type is returned.
If the array is larger than the collection, the array element after the last collection element is set to null |
| containsAll(Collection c) |
returns true if the collection contains the all the elements in the specified collection |
| addAll(Collection c) |
adds all the elements in the specified collection to this collection |
| clear() |
removes all the elements in the collection |
| removeAll(Collection c) |
removes all the this collections elements that are in the specified collection. |
| retainAll(Collection c) |
retains all the elements in this collection that are contained in the specified collection |
| add(Object o) |
adds an element to the collection.
Returns false if the element is not added as the collection class guarantees no duplicates.
|
| remove(Object o) |
removes the specified object from the collection, if it exists. |
| equals(Object o) |
programmers may override the Object.equals() method to implement collection specific comparisons eg "value" comparison vs "reference" comparison |
| hashCode() |
programmers overriding equals() must also override Object.hashCode() |