V
- The class of data stored in this mappublic class MultiValueMap<V>
extends java.util.HashMap<java.lang.String,java.util.Set<V>>
Constructor and Description |
---|
MultiValueMap() |
Modifier and Type | Method and Description |
---|---|
void |
addFieldValue(java.lang.String fieldName,
V fieldValue)
Add a value to the given field.
|
V |
getField(java.lang.String fieldName)
Gets the value for a particular field.
|
java.lang.String |
getFieldAsString(java.lang.String fieldName)
Gets the value of the specified field, converted to a String.
|
boolean |
isMultiValued(java.lang.String fieldName)
Return whether the given field has multiple values.
|
void |
mergeData(MultiValueMap<V> otherMap)
Merges the data from another MultiValueMap with this one.
|
void |
removeFieldValue(java.lang.String fieldName,
V fieldValue)
Remove a value from the set of values for the given fieldName
|
void |
setField(java.lang.String fieldName,
V fieldValue)
Sets the value for a particular field
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
public void addFieldValue(java.lang.String fieldName, V fieldValue)
fieldName
- the name of the fieldfieldValue
- the value of the fieldpublic V getField(java.lang.String fieldName)
fieldName
- the name of the fieldpublic java.lang.String getFieldAsString(java.lang.String fieldName)
fieldName
- the field namepublic boolean isMultiValued(java.lang.String fieldName)
fieldName
- the name of the fieldpublic void mergeData(MultiValueMap<V> otherMap)
otherMap
- The other node to merge with this node.public void removeFieldValue(java.lang.String fieldName, V fieldValue)
fieldName
- The field name for the valuefieldValue
- The value to removepublic void setField(java.lang.String fieldName, V fieldValue)
fieldName
- the name of the fieldfieldValue
- the value of the field