public interface CollectionUtils
| 限定符和类型 | 方法和说明 |
|---|---|
static <INPUT,OUTPUT> |
as(INPUT[] array,
Function<INPUT,OUTPUT> converter) |
static <INPUT,OUTPUT> |
as(Iterable<INPUT> iteration,
Function<INPUT,OUTPUT> converter) |
static <K,V> V |
computeIfAbsent(ConcurrentMap<K,V> map,
K key,
Supplier<V> supplier) |
static <K,V> V |
computeIfAbsent(ConcurrentMap<K,V> map,
K key,
Supplier<V> supplier,
Runnable actionIfAbsent) |
static <T extends Comparable<T>> |
min(T left,
T right) |
static <T> T |
min(T left,
T right,
Comparator<T> comparator) |
static <T> T |
next(T given,
Iterable<T> iteration) |
static <K,V> V |
putNew(K key,
V value,
Map<K,V> map,
Supplier<Object> name) |
static <T> T |
random(Collection<T> elements) |
static <T> T |
random(T given,
Iterable<T> iteration) |
static <K,V> void |
removeExisting(K key,
V value,
Map<K,V> map,
Supplier<Object> name) |
static <K,V> void |
replaceExisting(K key,
V oldValue,
V newValue,
Map<K,V> map,
Supplier<Object> name) |
static <T> T min(T left,
T right,
Comparator<T> comparator)
static <T extends Comparable<T>> T min(T left, T right)
static <T> T next(T given,
Iterable<T> iteration)
static <T> T random(T given,
Iterable<T> iteration)
static <T> T random(Collection<T> elements)
static <INPUT,OUTPUT> Iterable<OUTPUT> as(Iterable<INPUT> iteration, Function<INPUT,OUTPUT> converter)
static <K,V> void replaceExisting(K key,
V oldValue,
V newValue,
Map<K,V> map,
Supplier<Object> name)
static <K,V> void removeExisting(K key,
V value,
Map<K,V> map,
Supplier<Object> name)
static <K,V> V computeIfAbsent(ConcurrentMap<K,V> map, K key, Supplier<V> supplier, Runnable actionIfAbsent)
static <K,V> V computeIfAbsent(ConcurrentMap<K,V> map, K key, Supplier<V> supplier)
Copyright © 2017–2021 The Apache Software Foundation. All rights reserved.