Java collections cheat sheet

Interface names are in italics.

Object
  boolean equals(Object obj)
  int hashCode()
  String toString()

Comparable<T>
  int compareTo(T o)

Iterable<E>
|
+--Collection<E>
   |  boolean isEmpty()
   |
   +--List<E>
   |  |  boolean add(E e)
   |  |  E get(int index)
   |  |  E set(int index, E e)
   |  |
   |  +--ArrayList<E>
   |
   +--Queue<E>
   |  |  boolean add(E e)
   |  |  E remove()
   |  |
   |  +--ArrayDeque<E>
   |  |    void addFirst(E e)
   |  |    void addLast(E e)
   |  |    E removeFirst()
   |  |    E removeLast()
   |  |
   |  +--PriorityQueue<E>
   |
   +--Set<E>
      |  boolean add(E e)
      |  boolean contains(E e)
      |  boolean remove(E e)
      |
      +--HashSet<E>

Map<K, V>
|  V get(Object key)
|  V put(K key, V val)
|  boolean remove(Object key)
|
+--HashMap<K, V>