Collection Interface



Collection is a root Interface in the collection data structure Hierarchy.

Collection Interface has super Interface Iterable<E>.

Following are the sub interfaces of Collection
  1. BeanContext
  2. BeanContextServices
  3. BlockingDeque<E>
  4. BlockingQueue<E>
  5. Deque<E>
  6. List<E>
  7. NavigableSet<E>
  8. Queue<E>
  9. Set<E>
  10. SortedSet<E>
  11. TransferQueue<E>
Collection Interface contains following methods

boolean     add(E e);
boolean     addAll(Collection<? extends E> c);
void          clear();
boolean     contains(Object o);
boolean     containsAll(Collection<?> c);
boolean     equals(Object o);
int              hashCode();
boolean     isEmpty();
Iterator<E> iterator();
boolean     remove(Object o);
boolean     removeAll(Collection<?> c);
boolean     retainAll(Collection<?> c);
int              size();
Object[]     toArray();
<T> T[]     toArray(T[] a);