Package org.apache.wicket.util.lang
Class Generics
java.lang.Object
org.apache.wicket.util.lang.Generics
Generics related utilities
- Author:
- igor.vaynberg
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Iterator<T>
Silences generics warning when need to cast iterator typesstatic <T> ArrayList<T>
Creates a new ArrayListstatic <T> ArrayList<T>
newArrayList
(int capacity) Creates a new ArrayListstatic <K,
V> ConcurrentHashMap<K, V> Creates a new ConcurrentHashMapstatic <K,
V> ConcurrentHashMap<K, V> newConcurrentHashMap
(int initialCapacity) Creates a new ConcurrentHashMapstatic <K,
V> HashMap<K, V> Creates a new HashMapstatic <K,
V> HashMap<K, V> newHashMap
(int capacity) Creates a new HashMap
-
Method Details
-
iterator
Silences generics warning when need to cast iterator types- Type Parameters:
T
-- Parameters:
delegate
-- Returns:
delegate
iterator cast to proper generics type
-
newHashMap
Creates a new HashMap- Type Parameters:
K
-V
-- Returns:
- new hash map
-
newHashMap
Creates a new HashMap- Type Parameters:
K
-V
-- Parameters:
capacity
- initial capacity- Returns:
- new hash map
-
newArrayList
Creates a new ArrayList- Type Parameters:
T
-- Parameters:
capacity
- initial capacity- Returns:
- array list
-
newArrayList
Creates a new ArrayList- Type Parameters:
T
-- Returns:
- array list
-
newConcurrentHashMap
Creates a new ConcurrentHashMap- Type Parameters:
K
-V
-- Returns:
- new hash map
-
newConcurrentHashMap
Creates a new ConcurrentHashMap- Type Parameters:
K
-V
-- Parameters:
initialCapacity
- initial capacity- Returns:
- new hash map
-