|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.util.ImmutableMapParameter<K,V>
K
- Class of the key for the map.V
- Class of the value for the map.public class ImmutableMapParameter<K,V>
An immutable map that could be built by convenient constructors.
Example of using map Builder:
Map<String, AttibuteValue> item =
new ImmutableMapParameter.Builder<String, AttibuteValue>()
.put("one", new AttibuteValue("1"))
.put("two", new AttibuteValue("2"))
.put("three", new AttibuteValue("3"))
.build();
For small immutable maps (up to five entries), the ImmutableMapParamter.of()
methods are preferred:
Map<String, AttibuteValue> item =
ImmutableMapParameter
.of("one", new AttributeValue("1"),
"two", new AttributeValue("2"),
"three", new AttributeValue("3"),
Nested Class Summary | |
---|---|
static class |
ImmutableMapParameter.Builder<K,V>
A convenient builder for creating ImmutableMapParameter instances. |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Method Summary | ||
---|---|---|
static
|
builder()
Returns a new MapParameterBuilder instance. |
|
void |
clear()
Unsupported methods |
|
boolean |
containsKey(java.lang.Object key)
Inherited methods |
|
boolean |
containsValue(java.lang.Object value)
|
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
|
|
V |
get(java.lang.Object key)
|
|
boolean |
isEmpty()
|
|
java.util.Set<K> |
keySet()
|
|
static
|
of(K k0,
V v0)
Returns an ImmutableMapParameter instance containing a single entry. |
|
static
|
of(K k0,
V v0,
K k1,
V v1)
Returns an ImmutableMapParameter instance containing two entries. |
|
static
|
of(K k0,
V v0,
K k1,
V v1,
K k2,
V v2)
Returns an ImmutableMapParameter instance containing three entries. |
|
static
|
of(K k0,
V v0,
K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
Returns an ImmutableMapParameter instance containing four entries. |
|
static
|
of(K k0,
V v0,
K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
Returns an ImmutableMapParameter instance containing five entries. |
|
V |
put(K key,
V value)
|
|
void |
putAll(java.util.Map<? extends K,? extends V> map)
|
|
V |
remove(java.lang.Object key)
|
|
int |
size()
|
|
java.util.Collection<V> |
values()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Method Detail |
---|
public static <K,V> ImmutableMapParameter.Builder<K,V> builder()
public static <K,V> ImmutableMapParameter<K,V> of(K k0, V v0)
k0
- Key of the single entry.v0
- Value of the single entry.public static <K,V> ImmutableMapParameter<K,V> of(K k0, V v0, K k1, V v1)
k0
- Key of the first entry.v0
- Value of the first entry.k1
- Key of the second entry.v1
- Value of the second entry.public static <K,V> ImmutableMapParameter<K,V> of(K k0, V v0, K k1, V v1, K k2, V v2)
k0
- Key of the first entry.v0
- Value of the first entry.k1
- Key of the second entry.v1
- Value of the second entry.k2
- Key of the third entry.v2
- Value of the third entry.public static <K,V> ImmutableMapParameter<K,V> of(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3)
k0
- Key of the first entry.v0
- Value of the first entry.k1
- Key of the second entry.v1
- Value of the second entry.k2
- Key of the third entry.v2
- Value of the third entry.k3
- Key of the fourth entry.v3
- Value of the fourth entry.public static <K,V> ImmutableMapParameter<K,V> of(K k0, V v0, K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
k0
- Key of the first entry.v0
- Value of the first entry.k1
- Key of the second entry.v1
- Value of the second entry.k2
- Key of the third entry.v2
- Value of the third entry.k3
- Key of the fourth entry.v3
- Value of the fourth entry.k4
- Key of the fifth entry.v4
- Value of the fifth entry.public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map<K,V>
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map<K,V>
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
entrySet
in interface java.util.Map<K,V>
public V get(java.lang.Object key)
get
in interface java.util.Map<K,V>
public boolean isEmpty()
isEmpty
in interface java.util.Map<K,V>
public java.util.Set<K> keySet()
keySet
in interface java.util.Map<K,V>
public int size()
size
in interface java.util.Map<K,V>
public java.util.Collection<V> values()
values
in interface java.util.Map<K,V>
public void clear()
clear
in interface java.util.Map<K,V>
public V put(K key, V value)
put
in interface java.util.Map<K,V>
public void putAll(java.util.Map<? extends K,? extends V> map)
putAll
in interface java.util.Map<K,V>
public V remove(java.lang.Object key)
remove
in interface java.util.Map<K,V>
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |