net.cscott.jutil
public final class Factories extends Object
Factories
consists exclusively of static methods that
operate on or return CollectionFactory
s.Version: $Id: Factories.java,v 1.3 2004/01/13 21:40:19 cananian Exp $
Field Summary | |
---|---|
static ListFactory | arrayListFactory Returns a ListFactory that generates
ArrayList s. |
static MapFactory | hashMapFactory A MapFactory that generates HashMap s. |
static SetFactory | hashSetFactory A SetFactory that generates HashSet s. |
static SetFactory | linearSetFactory A SetFactory that generates
LinearSet s backed by ArrayList s. |
static ListFactory | linkedListFactory A ListFactory that generates LinkedList s. |
static SetFactory | treeSetFactory A SetFactory that generates TreeSet s. |
static SetFactory | workSetFactory A SetFactory that generates WorkSet s. |
Method Summary | |
---|---|
static <V> ListFactory<V> | arrayListFactory() |
static <K,V> MapFactory<K,V> | hashMapFactory() |
static <V> SetFactory<V> | hashSetFactory() |
static <V> SetFactory<V> | linearSetFactory() |
static <V> ListFactory<V> | linkedListFactory() |
static <K,V> SetFactory<Entry<K,V>> | mapSetFactory(MapFactory<K,V> mf) Returns a SetFactory that generates MapSet
views of maps generated by the given MapFactory . |
static <K,V> SetFactory<Entry<K,V>> | multiMapSetFactory(MultiMapFactory<K,V> mf) Returns a SetFactory that generates
MultiMapSet views of MultiMap s
generated by the given MultiMapFactory . |
static <V> CollectionFactory<V> | noNullCollectionFactory(CollectionFactory<V> cf) |
static <V> CollectionFactory<V> | synchronizedCollectionFactory(CollectionFactory<V> cf) Returns a CollectionFactory that generates
synchronized (thread-safe) Collection s.
|
static <V> ListFactory<V> | synchronizedListFactory(ListFactory<V> lf) Returns a ListFactory that generates synchronized
(thread-safe) List s. |
static <K,V> MapFactory<K,V> | synchronizedMapFactory(MapFactory<K,V> mf) Returns a MapFactory that generates synchronized
(thread-safe) Map s. |
static <V> SetFactory<V> | synchronizedSetFactory(SetFactory<V> sf) Returns a SetFactory that generates synchronized
(thread-safe) Set s. |
static <V> SetFactory<V> | treeSetFactory() |
static <V> SetFactory<V> | workSetFactory() |
ListFactory
that generates
ArrayList
s.MapFactory
that generates HashMap
s.SetFactory
that generates HashSet
s.SetFactory
that generates
LinearSet
s backed by ArrayList
s.ListFactory
that generates LinkedList
s.SetFactory
that generates TreeSet
s.SetFactory
that generates WorkSet
s.SetFactory
that generates MapSet
views of maps generated by the given MapFactory
. These
can be passed in as arguments to a GenericMultiMap
,
for example, to make a multimap of maps.SetFactory
that generates
MultiMapSet
views of MultiMap
s
generated by the given MultiMapFactory
. These can be
passed in as arguments to a GenericMultiMap
, for
example, to make a multimap of multimaps.CollectionFactory
that generates
synchronized (thread-safe) Collection
s.
The Collection
s generated are backed by the
Collection
s generated by cf
.See Also: Collections#synchronizedCollection
ListFactory
that generates synchronized
(thread-safe) List
s. The List
s
generated are backed by the List
s generated by
lf
.See Also: Collections#synchronizedList
MapFactory
that generates synchronized
(thread-safe) Map
s. The Map
s
generated are backed by the Map
generated by
mf
.See Also: Collections#synchronizedMap
SetFactory
that generates synchronized
(thread-safe) Set
s. The Set
s
generated are backed by the Set
s generated by
sf
.See Also: Collections#synchronizedSet