O'Reilly logo

PURE Java™ 2 by Kenneth Litwak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interface and Class Details

Interface Collection

public abstract interface Collection
						

The Collection interface is the base interface for all Collection interfaces and the basis of all Collection classes in the Collection framework. Collection is simply a set of objects that can be treated as individual items or as a group. The Collection interface specifies methods for dealing with individual objects, such as add(), and for dealing with a whole Collection at once, such as removeAll().

Methods
boolean     add(Object o)
boolean     addAll(Collection c)
void        clear()
boolean     contains(Object o)
boolean     containsAll(Collection c)
boolean     equals(Object o)
int         hashCode()
boolean     isEmpty()
Iterator    iterator()
boolean     remove(Object o)
boolean     removeAll(Collection ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required