생성자
메서드
boolean | add(E e)
void | add(int index, E element)
boolean | addAll(Collection<? extends E> c)
boolean | addAll(int index, Collection<? extends E> c)
void | clear()
Object | clone()
boolean | contains(Object o)
void | forEach(Consumer<? super E> action)
E | get(int index)
int | indexOf(Object o)
boolean | isEmpty()
Iterator<E> | iterator()
int | lastIndexOf(Object o)
ListIterator<E> | listIterator()
ListIterator<E> | listIterator(int index)
E | remove(int index)
boolean | remove(Object o)
boolean | removeAll(Collection<?> c)
boolean | removeIf(Predicate<? super E> filter)
protected void | removeRange(int fromIndex, int toIndex)
void | replaceAll(UnaryOperator<E> operator)
boolean | retainAll(Collection<?> c)
E | set(int index, E element)
int | size()
void | sort(Comparator<? super E> c)
Spliterator<E> | spliterator()
List<E> | subList(int fromIndex, int toIndex)
Object[] | toArray()
<T> T[] | toArray(T[] a)
void | trimToSize()
List 주의점
//Shallow copy
ArrayList<String> list = new ArrayList<String>(originList);
생성자
메서드
boolean | empty()
E | peek()
E | pop()
E | push(E item)
int | search(Object o)
Queue
boolean | add(E e)
E | element()
boolean | offer(E e)
E | peek()
E | poll()
E | remove()
Deque
생성자
loadFactor: 데이터의 개수/ 저장 공간
메서드
boolean | add(E e)
boolean | addAll(Collection<? extends E> c)
void | clear()
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()
default Spliterator<E> | spliterator()
Object[] | toArray()
<T> T[] | toArray(T[] a)
red-black 트리: 각 노드의 색을 붉은 색이나 검은색으로 구분하여 데이터를 빠르고 쉽게 찾을 수 있는 이진 트리
생성자
메서드
void clear()
Object clone()
V compute(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
V computeIfAbsent(K key, Function<? super K,? extends V> mappingFunction)
V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> remappingFunction)
boolean containsKey(Object key)
boolean containsValue(Object value)
Set<Map.Entry<K,V>> entrySet()
void forEach(BiConsumer<? super K,? super V> action)
V get(Object key)
V getOrDefault(Object key, V defaultValue)
boolean isEmpty()
Set<K> keySet()
V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
V put(K key, V value)
void putAll(Map<? extends K,? extends V> m)
V putIfAbsent(K key, V value)
V remove(Object key)
boolean remove(Object key, Object value)
V replace(K key, V value)
boolean replace(K key, V oldValue, V newValue)
void replaceAll(BiFunction<? super K,? super V,? extends V> function)
int size()
Collection<V> values()
출처