public final class CollectionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
capacity(int expectedSize)
Returns a capacity that is sufficient to keep the map from being resized
as long as it grows no larger than expectedSize and the load factor is >=
its default (0.75).
|
static <T> List<List<T>> |
chopped(List<T> list,
int length) |
static <K,V> Supplier<Map<K,V>> |
getConcurrentMapSupplier() |
static <T> Supplier<Deque<T>> |
getDequeSupplier() |
static <T> Supplier<List<T>> |
getListSupplier() |
static <T> Supplier<List<T>> |
getListSupplier(int size) |
static <K,V> Supplier<Map<K,V>> |
getMapSupplier() |
static <K,V> Supplier<Map<K,V>> |
getMapSupplier(int size) |
static <T> Supplier<Queue<T>> |
getQueueSupplier() |
static <T> Supplier<Set<T>> |
getSetSupplier() |
static <T> Supplier<Set<T>> |
getSetSupplier(int size) |
static <K,V> Supplier<Map<K,V>> |
getWeakMapSupplier() |
static <K,V> Map<K,V> |
newConcurrentMap() |
static <K> List<K> |
newList() |
static <K> List<K> |
newList(int size) |
static <K,V> Map<K,V> |
newMap() |
static <K,V> Map<K,V> |
newMap(int size) |
static <K> Set<K> |
newSet() |
static <K> Set<K> |
newSet(int size) |
static Collection<Integer> |
range(int startInc,
int endInc) |
public static int capacity(int expectedSize)
public static <K,V> Map<K,V> newMap()
public static <K> Set<K> newSet()
public static <K> List<K> newList()
public static <K,V> Map<K,V> newMap(int size)
public static <K> Set<K> newSet(int size)
public static <K> List<K> newList(int size)
public static <K,V> Map<K,V> newConcurrentMap()
public static Collection<Integer> range(int startInc, int endInc)
Copyright © 2014–2015. All rights reserved.