Package org.apache.wicket.util.lang
Class Generics
- java.lang.Object
-
- org.apache.wicket.util.lang.Generics
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Iterator<T>
iterator(Iterator<?> delegate)
Silences generics warning when need to cast iterator typesstatic <T> ArrayList<T>
newArrayList()
Creates a new ArrayListstatic <T> ArrayList<T>
newArrayList(int capacity)
Creates a new ArrayListstatic <K,V>
ConcurrentHashMap<K,V>newConcurrentHashMap()
Creates a new ConcurrentHashMapstatic <K,V>
ConcurrentHashMap<K,V>newConcurrentHashMap(int initialCapacity)
Creates a new ConcurrentHashMapstatic <K,V>
HashMap<K,V>newHashMap()
Creates a new HashMapstatic <K,V>
HashMap<K,V>newHashMap(int capacity)
Creates a new HashMap
-
-
-
Method Detail
-
iterator
public static <T> Iterator<T> iterator(Iterator<?> delegate)
Silences generics warning when need to cast iterator types- Type Parameters:
T
-- Parameters:
delegate
-- Returns:
delegate
iterator cast to proper generics type
-
newHashMap
public static <K,V> HashMap<K,V> newHashMap()
Creates a new HashMap- Type Parameters:
K
-V
-- Returns:
- new hash map
-
newHashMap
public static <K,V> HashMap<K,V> newHashMap(int capacity)
Creates a new HashMap- Type Parameters:
K
-V
-- Parameters:
capacity
- initial capacity- Returns:
- new hash map
-
newArrayList
public static <T> ArrayList<T> newArrayList(int capacity)
Creates a new ArrayList- Type Parameters:
T
-- Parameters:
capacity
- initial capacity- Returns:
- array list
-
newArrayList
public static <T> ArrayList<T> newArrayList()
Creates a new ArrayList- Type Parameters:
T
-- Returns:
- array list
-
newConcurrentHashMap
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap()
Creates a new ConcurrentHashMap- Type Parameters:
K
-V
-- Returns:
- new hash map
-
newConcurrentHashMap
public static <K,V> ConcurrentHashMap<K,V> newConcurrentHashMap(int initialCapacity)
Creates a new ConcurrentHashMap- Type Parameters:
K
-V
-- Parameters:
initialCapacity
- initial capacity- Returns:
- new hash map
-
-