1.Collection
- 添加元素 boolean add(E e)
- 删除元素 boolean remove(E e)
- 元素个数 int size()
- 清空 void clear()
- 判空 boolean isEmpty()
- 是否包含元素 boolean contains(Object o)
- boolean containsAll()
- Object[] toArray()
- <T> T[] toArray(T[] a)
- 取交集 boolean retainAll(Collection<?> c)
- 取差 boolean removeAll(Colllection<?> c)
- 取并集(不去重) boolean addAll()
Object
- boolean equals(Object)
- int hashcode()
Iterable
- 迭代器iterator()
- spliterator()
- removeIf()
- stream()
- parallelStream()
1.1 List
- void replaceAll()
List<String> list=new ArrayList<String>();
list.replaceAll(t->t+" ")
- void sort(Comparable<? super E>)
- E get(int)
- E set(int, E)
- void add(int, E)
- 索引 int indexOf(Object)
- int lastIndexOf(Object)
- 截取列表 List<E> subList(int,int)
- ListIterator<E> listIterator()
- ListIterator<E> listIterator(int)
1.1.1 ArrayList
1.1.2 LinkedList
1.1.3 Vector
1.1.4 Stack
1.2 Set
1.2.1 HashSet
1.2.2 LinkedHashSet
1.2.3 TreeSet
1.3 Queue
...
2.Map
2.1 HashMap
2.2 TreeMap
2.3 HashTable
2.4 LinkedHashMap
2.5 CurrentHashMap
Iterator、LinkIterator
Collections、Arrays
Comparable、Comparator
网友评论