| java.lang.Object org.apache.tapestry.ioc.internal.util.CollectionFactory
CollectionFactory | final public class CollectionFactory (Code) | | Static factory methods to ease the creation of new collection types (when using generics). Most
of these method leverage the compiler's ability to match generic types by return value. Typical
usage (with a static import):
Map<Foo, Bar> map = newMap();
This is a replacement for:
Map<Foo, Bar> map = new HashMap<Foo, Bar>();
|
newCaseInsensitiveMap | public static Map<String, V> newCaseInsensitiveMap()(Code) | | |
newConcurrentMap | public static ConcurrentMap<K, V> newConcurrentMap()(Code) | | Constructs a new concurrent map, which is safe to access via multiple threads.
|
newLinkedList | public static LinkedList<T> newLinkedList()(Code) | | Useful for queues.
|
newList | public static List<T> newList(V... elements)(Code) | | Creates a new, fully modifiable list from an initial set of elements.
|
newMap | public static Map<K, V> newMap()(Code) | | Constructs and returns a generic
HashMap instance.
|
newMap | public static Map<K, V> newMap(Map<? extends K, ? extends V> map)(Code) | | Constructs a new
java.util.HashMap instance by copying an existing Map instance.
|
newSet | public static Set<T> newSet(Collection<V> values)(Code) | | Contructs a new
HashSet and initializes it using the provided collection.
|
newSet | public static Set<T> newSet(V... values)(Code) | | |
|
|