public class KeyValueMap<T> extends Commentable implements java.lang.Iterable<java.util.Map.Entry<java.lang.String,T>>
Constructor and Description |
---|
KeyValueMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the map
|
T |
get(java.lang.String key)
Get an item from the map.
|
boolean |
isEmpty()
Check whether this map is empty.
|
java.util.Iterator<java.util.Map.Entry<java.lang.String,T>> |
iterator() |
void |
put(java.lang.String key,
T value)
Put an item in the map
|
void |
putAll(KeyValueMap<T> map)
Put all items from the other map in this map
|
T |
remove(java.lang.String key)
Remove an item from the map
|
int |
size()
Get the size of the map.
|
java.lang.String |
toString() |
getComment, setComment
getLocation, setLocation
public T get(java.lang.String key)
key
- The key of the item.null
.public void put(java.lang.String key, T value)
key
- The key of the item.value
- The valuepublic T remove(java.lang.String key)
key
- The key of the item.null
.public void putAll(KeyValueMap<T> map)
map
- The other mappublic java.util.Iterator<java.util.Map.Entry<java.lang.String,T>> iterator()
iterator
in interface java.lang.Iterable<java.util.Map.Entry<java.lang.String,T>>
public boolean isEmpty()
true
if the map is empty.public java.lang.String toString()
toString
in class Commentable
public int size()
public void clear()
Copyright © 2010 - 2020 Adobe. All Rights Reserved