Constructor and Description |
---|
KeyValueMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the map
|
T |
get(String key)
Get an item from the map.
|
boolean |
isEmpty()
Check whether this map is empty.
|
Iterator<Map.Entry<String,T>> |
iterator() |
void |
put(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(String key)
Remove an item from the map
|
int |
size()
Get the size of the map.
|
String |
toString() |
getComment, setComment
getLocation, setLocation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public T get(String key)
key
- The key of the item.null
.public void put(String key, T value)
key
- The key of the item.value
- The valuepublic T remove(String key)
key
- The key of the item.null
.public void putAll(KeyValueMap<T> map)
map
- The other mappublic boolean isEmpty()
true
if the map is empty.public String toString()
toString
in class Commentable
public int size()
public void clear()
Copyright © 2017 The Apache Software Foundation. All rights reserved.