|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MultiStringMap
This is interface defining a map that can, for a value, have one or more strings. It is used for request or response headers or request parameters.
| Method Summary | |
|---|---|
void |
add(String id,
String value)
Adds new element to the map. |
void |
addAll(String id,
Collection<String> values)
Adds all elements from the given collection |
void |
addAll(String id,
String[] values)
Adds all elements from the given array. |
void |
clear()
Clears the map |
boolean |
containsKey(String id)
Returns true if there is at least one entry |
Collection<Map.Entry<String,String>> |
getAllEntries()
Returns list of all entries. |
String[] |
getAsArray(String id)
Returns array of all elements under asked key. |
List<String> |
getAsList(String id)
Returns list of all elements under asked key. |
Map<String,Object> |
getAsMap()
Returns a map that contains all elements. |
int |
getEntrySize(String id)
Returns number of entries for given key |
String |
getFirst(String id)
Retrieves first element from the given key. |
String |
getOnly(String id)
Retrieves element from the given key. |
Set<String> |
keySet()
Returns key set |
void |
putAll(String id,
Collection<String> values)
Replaces existing element(s), if there are any under the given key, with the given values. |
void |
putAll(String id,
String[] values)
Replaces existing element(s), if there are any under the given key, with the given values. |
void |
putOnly(String id,
String value)
Replaces existing element(s), if there are any under the given key, with the given value. |
String |
remove(String id,
int index)
Removes n-th element from the given key. |
Collection<String> |
removeAll(String id)
Removes all elements from the given key |
String |
removeFirst(String id)
Removes first element from the given key. |
int |
size()
Number of keys in the map. |
| Method Detail |
|---|
void add(String id,
String value)
id - keyvalue - value to be added
void addAll(String id,
String[] values)
id - keyvalues - array of valuesadd(String, String)
void addAll(String id,
Collection<String> values)
id - keyvalues - collection which elements are to be addedadd(String, String)
void putOnly(String id,
String value)
id - keyvalue - value to be put to the map
void putAll(String id,
String[] values)
id - keyvalues - values to be put to the mapputOnly(String, String)
void putAll(String id,
Collection<String> values)
id - keyvalues - collection of values to be put to the mapputOnly(String, String)Collection<String> removeAll(String id)
id - keyString removeFirst(String id)
id - key
String remove(String id,
int index)
id - keyindex - index of the element to be removed
IndexOutOfBoundsException - if there are no elements under the given keyboolean containsKey(String id)
true if there is at least one entry
id - key
true if there is at least one entryint getEntrySize(String id)
id - key
String getOnly(String id)
id - key of the asked element
IllegalStateException - if there are more then one element under this keyString getFirst(String id)
id - key of the asked element
null if there are no elements givenString[] getAsArray(String id)
id - key of the asked elements
List<String> getAsList(String id)
id - key of the asked elements
void clear()
Collection<Map.Entry<String,String>> getAllEntries()
Set<String> keySet()
Map<String,Object> getAsMap()
int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||