|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ning.http.client.FluentStringsMap
public class FluentStringsMap
An implementation of a String -> List<String>
map that adds a fluent interface, i.e. methods that
return this instance.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
FluentStringsMap()
|
|
FluentStringsMap(FluentStringsMap src)
|
|
FluentStringsMap(Map<String,Collection<String>> src)
|
Method Summary | |
---|---|
FluentStringsMap |
add(String key,
Collection<String> values)
Adds the specified values and returns this object. |
FluentStringsMap |
add(String key,
String... values)
Adds the specified values and returns this object. |
FluentStringsMap |
addAll(FluentStringsMap src)
Adds all key-values pairs from the given object to this object and returns this object. |
FluentStringsMap |
addAll(Map<String,Collection<String>> src)
Adds all key-values pairs from the given map to this object and returns this object. |
void |
clear()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
FluentStringsMap |
delete(String key)
Removes the values for the given key if present and returns this object. |
FluentStringsMap |
deleteAll(Collection<String> keys)
Removes the values for the given keys if present and returns this object. |
FluentStringsMap |
deleteAll(String... keys)
Removes the values for the given keys if present and returns this object. |
Set<Map.Entry<String,List<String>>> |
entrySet()
|
boolean |
equals(Object obj)
|
List<String> |
get(Object key)
|
String |
getFirstValue(String key)
Returns the value for the given key. |
String |
getJoinedValue(String key,
String delimiter)
Returns the values for the given key joined into a single string using the given delimiter. |
int |
hashCode()
|
boolean |
isEmpty()
|
Iterator<Map.Entry<String,List<String>>> |
iterator()
|
Set<String> |
keySet()
|
List<String> |
put(String key,
List<String> value)
|
void |
putAll(Map<? extends String,? extends List<String>> values)
|
List<String> |
remove(Object key)
|
FluentStringsMap |
replace(String key,
Collection<String> values)
Replaces the values for the given key with the given values. |
FluentStringsMap |
replace(String key,
String... values)
Replaces the values for the given key with the given values. |
FluentStringsMap |
replaceAll(FluentStringsMap src)
Replace the values for all keys from the given map that are also present in this object, with the values from the given map. |
FluentStringsMap |
replaceAll(Map<? extends String,? extends Collection<String>> src)
Replace the values for all keys from the given map that are also present in this object, with the values from the given map. |
int |
size()
|
String |
toString()
|
Collection<List<String>> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FluentStringsMap()
public FluentStringsMap(FluentStringsMap src)
public FluentStringsMap(Map<String,Collection<String>> src)
Method Detail |
---|
public FluentStringsMap add(String key, String... values)
key
- The keyvalues
- The value(s); if null then this method has no effect. Use the empty string to
generate an empty value
public FluentStringsMap add(String key, Collection<String> values)
key
- The keyvalues
- The value(s); if null then this method has no effect. Use an empty collection
to generate an empty value
public FluentStringsMap addAll(FluentStringsMap src)
src
- The source object
public FluentStringsMap addAll(Map<String,Collection<String>> src)
src
- The source map
public FluentStringsMap replace(String key, String... values)
key
- The keyvalues
- The new values
public FluentStringsMap replace(String key, Collection<String> values)
key
- The keyvalues
- The new values
public FluentStringsMap replaceAll(FluentStringsMap src)
src
- The source object
public FluentStringsMap replaceAll(Map<? extends String,? extends Collection<String>> src)
src
- The source map
public List<String> put(String key, List<String> value)
put
in interface Map<String,List<String>>
public void putAll(Map<? extends String,? extends List<String>> values)
putAll
in interface Map<String,List<String>>
public FluentStringsMap delete(String key)
key
- The key
public FluentStringsMap deleteAll(String... keys)
keys
- The keys
public FluentStringsMap deleteAll(Collection<String> keys)
keys
- The keys
public List<String> remove(Object key)
remove
in interface Map<String,List<String>>
public void clear()
clear
in interface Map<String,List<String>>
public Iterator<Map.Entry<String,List<String>>> iterator()
iterator
in interface Iterable<Map.Entry<String,List<String>>>
public Set<String> keySet()
keySet
in interface Map<String,List<String>>
public Set<Map.Entry<String,List<String>>> entrySet()
entrySet
in interface Map<String,List<String>>
public int size()
size
in interface Map<String,List<String>>
public boolean isEmpty()
isEmpty
in interface Map<String,List<String>>
public boolean containsKey(Object key)
containsKey
in interface Map<String,List<String>>
public boolean containsValue(Object value)
containsValue
in interface Map<String,List<String>>
public String getFirstValue(String key)
key
- The key
public String getJoinedValue(String key, String delimiter)
key
- The key
public List<String> get(Object key)
get
in interface Map<String,List<String>>
public Collection<List<String>> values()
values
in interface Map<String,List<String>>
public boolean equals(Object obj)
equals
in interface Map<String,List<String>>
equals
in class Object
public int hashCode()
hashCode
in interface Map<String,List<String>>
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |