public class Generics extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterator<T> |
iterator(Iterator<?> delegate)
Silences generics warning when need to cast iterator types
|
static <T> ArrayList<T> |
newArrayList()
Creates a new ArrayList
|
static <T> ArrayList<T> |
newArrayList(int capacity)
Creates a new ArrayList
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap()
Creates a new ConcurrentHashMap
|
static <K,V> ConcurrentHashMap<K,V> |
newConcurrentHashMap(int initialCapacity)
Creates a new ConcurrentHashMap
|
static <K,V> HashMap<K,V> |
newHashMap()
Creates a new HashMap
|
static <K,V> HashMap<K,V> |
newHashMap(int capacity)
Creates a new HashMap
|
public static <T> Iterator<T> iterator(Iterator<?> delegate)
T - delegate - delegate iterator cast to proper generics typepublic static <K,V> HashMap<K,V> newHashMap()
K - V - public static <K,V> HashMap<K,V> newHashMap(int capacity)
K - V - capacity - initial capacitypublic static <T> ArrayList<T> newArrayList(int capacity)
T - capacity - initial capacitypublic static <T> ArrayList<T> newArrayList()
T - public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap()
K - V - public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(int initialCapacity)
K - V - initialCapacity - initial capacityCopyright © 2006–2020 Apache Software Foundation. All rights reserved.