public class VObjectParameters extends Object implements Iterable<Map.Entry<String,List<String>>>
VObjectProperty. Enforces case-insensitivity of parameter names by
converting them to uppercase.| Constructor and Description |
|---|
VObjectParameters()
Creates an empty list of parameters.
|
VObjectParameters(Map<String,List<String>> map)
Creates a list of parameters backed by the given map.
|
VObjectParameters(VObjectParameters original)
Copies an existing list of parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the multimap.
|
boolean |
equals(Object obj) |
String |
first(String key)
Gets the first value assigned to the given key.
|
List<String> |
get(String key)
Gets the values that are assigned to a key.
|
Charset |
getCharset()
Gets the CHARSET parameter.
|
Map<String,List<String>> |
getMap()
Gets the map that backs this parameters list.
|
int |
hashCode() |
boolean |
isQuotedPrintable()
Determines if a "quoted-printable encoding" parameter exists.
|
Iterator<Map.Entry<String,List<String>>> |
iterator()
Creates an iterator over all the parameters (for use in foreach loops).
|
void |
put(String key,
String value)
Inserts a value.
|
void |
putAll(String key,
String... values)
Inserts multiple values.
|
boolean |
remove(String key,
String value)
Removes a value.
|
List<String> |
removeAll(String key)
Removes all values associated with a key, along with the key itself.
|
List<String> |
replace(String key,
String value)
Replaces all the values of the given key with the given value.
|
List<String> |
replaceAll(String key,
String... values)
Replaces all the values of the given key with the given values.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic VObjectParameters()
public VObjectParameters(Map<String,List<String>> map)
Creates a list of parameters backed by the given map. Any changes made to the given map will effect the parameter list and vice versa.
If the given map is not empty, care should be taken to ensure that all of its keys are in uppercase before passing it into this constructor.
map - the mappublic VObjectParameters(VObjectParameters original)
original - the existing listpublic List<String> get(String key)
key - the keypublic void put(String key, String value)
key - the keyvalue - the value to addpublic void putAll(String key, String... values)
key - the keyvalues - the values to addpublic List<String> replace(String key, String value)
key - the keyvalue - the valuepublic List<String> replaceAll(String key, String... values)
key - the keyvalues - the valuespublic boolean remove(String key, String value)
key - the keyvalue - the value to removepublic List<String> removeAll(String key)
key - the keypublic void clear()
public String first(String key)
key - the keypublic boolean isQuotedPrintable()
public Charset getCharset() throws IllegalCharsetNameException, UnsupportedCharsetException
IllegalCharsetNameException - if the character set name contains
illegal charactersUnsupportedCharsetException - if the local JVM does not recognized
the character setpublic Map<String,List<String>> getMap()
public Iterator<Map.Entry<String,List<String>>> iterator()
Copyright © 2016–2018 Michael Angstadt. All rights reserved.