Monday, September 18, 2006

SCJP 5.0: Collections: the Map Interface

Some Map Interface methods:

void clear()

boolean containsKey(Object key)

boolean containsValue(Object value)

boolean equals(Object obj)

Object get(Object key)

int hashcode()

boolean isEmpty()

Object put(Object key, Object value)

void putAll (Map m)

Object remove(Object key)

int size()

Collection values()

For more detail see Sun's tutorial.

Labels: ,

SCJP 5.0: Collections: the Collections Interfaces

Collection
^ ^
| |
List Set
^
|
SortedSet


Map
^
|
SortedMap

Labels: ,

SCJP 5.0: Collections: the Collection Interface

Some methods in the Collection Interface:

boolean add(Object obj)
boolean addAll(Collection c)

void clear()

boolean contains(Object obj)
boolean containsAll(Collection c)

boolean isEmpty()

boolean equals(Object obj)

int hashcode()

boolean remove(Object obj)
boolean removeAll(Collection c)

Iterator iterator()

T[] toArray(T[] array)

For more detail see Sun's tutorial.

Labels: ,