| 接口 | 说明 |
|---|---|
| StreamForker.Results |
| 类 | 说明 |
|---|---|
| ArrayHashKey |
The class use in Object array as hash map key
Use for HashMap key
|
| ByteArrayComparator |
The utility for compare two byte array
For compare
|
| ByteArrayTrait |
Represents the class has an byte[] array args constructor and a toByteArray method
For serialize
|
| ByteArrayWrapper |
The class use in byte array as hash map key
For HashMap key
|
| Collects |
集合工具类
|
| Comparators |
For collection order
|
| DelegatedIntSpliterator<T> |
Delegated int spliterator
|
| DoubleListViewer<E> |
Double(tow-dimensional) list viewer
|
| FilterableIterator<T> |
遍历集合,选取符合条件的元素,用于增强for循环场景
for (String s : FilterableIterator.of("", null, "a")) {
System.out.println(s);
}
|
| ImmutableArrayList<E> |
Representing immutable List
|
| ImmutableHashList<K extends Comparable<K>,V> |
Immutable hash map & list structure
|
| LRUCache<K,V> |
LRU cache based LinkedHashMap
|
| Maps |
Map Utilities
|
| StreamForker<T> |
The class use in fork
Stream,
from book "Java 8 In Action"
Usage:
Stream<Integer> stream = Stream.of(1, 2, 3, 4, 4, 5, 5);
StreamForker.Results results = new StreamForker<>(stream)
.fork(1, s -> s.max(Integer::compareTo)) // 直接聚合
.fork(2, s -> s.distinct().reduce(0, Integer::sum))
.getResults();
|
| ValueSortedMap<K,V> |
Extends TreeMap sort by value:
ValueSortedMap valueSortedMap = ValueSortedMap.nullsFirst(a map);
Also use like this:
Map<String, Integer> originMap = ImmutableMap.of("b", 2, "a", 1);
TreeMap<String, Integer> sortedByValueMap = new TreeMap<>(Comparator.comparing(originMap::get));
sortedByValueMap.putAll(originMap);
|
Copyright © 2023. All rights reserved.