|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.common.util.MapBuilder<M,K,V>
public class MapBuilder<M extends java.util.Map<K,V>,K,V>
An helper to build map in a simple manner.
Method Summary | ||
---|---|---|
static
|
create(M m)
|
|
M |
get()
|
|
static
|
hashMap()
Creates a new instance. |
|
static
|
hashMap(K k,
V v)
Creates a new instance. |
|
static
|
linkedHashMap()
Creates a new instance. |
|
static
|
linkedHashMap(K k,
V v)
Creates a new instance. |
|
MapBuilder<M,K,V> |
put(K key,
V value)
Add the object to the collection. |
|
MapBuilder<M,K,V> |
putAll(M all)
Add all the objects to the collection. |
|
static
|
treeMap()
Creates a new instance. |
|
static
|
treeMap(K k,
V v)
Creates a new instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <K,V> MapBuilder<java.util.HashMap<K,V>,K,V> hashMap()
public static <K,V> MapBuilder<java.util.HashMap<K,V>,K,V> hashMap(K k, V v)
public static <K,V> MapBuilder<java.util.TreeMap<K,V>,K,V> treeMap()
public static <K,V> MapBuilder<java.util.TreeMap<K,V>,K,V> treeMap(K k, V v)
public static <K,V> MapBuilder<java.util.LinkedHashMap<K,V>,K,V> linkedHashMap()
public static <K,V> MapBuilder<java.util.LinkedHashMap<K,V>,K,V> linkedHashMap(K k, V v)
public static <M extends java.util.Map<K,V>,K,V> MapBuilder<M,K,V> create(M m)
public MapBuilder<M,K,V> put(K key, V value)
key
- the keyvalue
- the value
public MapBuilder<M,K,V> putAll(M all)
all
- the entries to add
public M get()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |