public class CollectionFactory extends Object
List list1 = CollectionFactory.newList();
List> list2 = CollectionFactory.newList();
| Constructor and Description |
|---|
CollectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
newList()
Magic method to create a generic ArrayList
|
static <K,V> Map<K,V> |
newMap()
Magic method to create a generic Map
|
static <T> Set<T> |
newSet()
Magic method to create a generic Set
|
static <T> Stack<T> |
newStack()
Magic method to create a generic Stack.
|
static <K,V> TreeMap<K,V> |
newTreeMap()
Magic methid to create a TreeMap
|
static <T> TreeSet<T> |
newTreeSet()
Magic method to create a generic Set
|
public static <K,V> Map<K,V> newMap()
Example of use:
Map
public static <K,V> TreeMap<K,V> newTreeMap()
Example of use:
Map
public static <T> List<T> newList()
Example of use:
List
public static <T> Stack<T> newStack()
Example of use:
Stack
public static <T> Set<T> newSet()
Example of use:
Set
public static <T> TreeSet<T> newTreeSet()
Example of use:
Set
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.