This is a draft cheat sheet. It is a work in progress and is not finished yet.
List
add(el) |
lastIndexOf() |
add(idx, el) |
listIterator() |
addAll(Collection c) |
listIterator(idx) |
clear() |
remove(idx) |
contains(el) |
remove(el) |
containsAll(Collection c) |
replaceAll(UnaryOperator op) |
equals(List l) |
retainAll(Collection c) |
get(idx) |
set(idx, el) |
hashCode() |
size() |
indexOf(el) |
sort(Comparator c) |
isEmpty() |
subList(from, to) |
iterator() |
toArray() |
|
|
Linked List
addFirst(el) |
peekFirst() |
addLast(el) |
peekLast() |
clone() |
poll() |
getFirst() |
pollFirst() |
getLast() |
pollLast() |
offer(el) |
pop() |
offerFirst(el) |
push(el) |
offerLast(el) |
removeFirst() |
peek() |
removeLast() |
Map
clear() |
keySet() |
containsKey(key) |
put(key, val) |
containsValue(value) |
putAll(Map m) |
entrySet() |
putIfAbsent(key, val) |
equals(Map m) |
remove(key) |
get(key) |
remove(key, val) |
getOrDefault(key, defaultValue) |
replace(key, val) |
hashCode() |
size() |
isEmpty() |
values() |
|
|
Set
add(el) |
iterator() |
addAll(Collection c) |
remove(el) |
clear() |
removeAll(Collection c) |
contains(el) |
retainAll(Collection c) |
equals(Set s) |
size() |
hashCode() |
toArray() |
isEmpty() |
Queue
add(el) |
iterator() |
addAll(Collection c) |
offer(el) |
clear() |
peek() |
contains(el) |
poll() |
containsAll(Collection c) |
remove() |
element() |
removeAll() |
equals(Queue Q) |
retainAll() |
hashCode() |
size() |
isEmpty() |
toArray() |
|