Package org.eclipse.jetty.util
Class MultiMap<V>
- Type Parameters:
V- the entry type for multimap values
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,List<V>> SequencedMap<String,List<V>>
- Direct Known Subclasses:
UrlEncoded
Deprecated.
The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
A multi valued Map.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Add value to multi valued entry.booleanaddAllValues(MultiMap<V> map) Deprecated.Merge values.voidDeprecated.Add values to multi valued entry.voidDeprecated.Add values to multi valued entry.booleancontainsSimpleValue(V value) Deprecated.Test for a specific single value in the map.Deprecated.Get value as String.Deprecated.Get a value from a multiple value.Deprecated.Get multiple values.Deprecated.Put multi valued entry.voidputAllValues(Map<String, V> input) Deprecated.Shorthand version of putAllDeprecated.Put multi valued entry.Deprecated.Put multi valued entry.booleanremoveValue(String name, V value) Deprecated.Remove value.toString()Deprecated.Deprecated.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCodeMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
MultiMap
public MultiMap()Deprecated. -
MultiMap
Deprecated. -
MultiMap
Deprecated.
-
-
Method Details
-
getValues
Deprecated.Get multiple values. Single valued entries are converted to singleton lists.- Parameters:
name- The entry key.- Returns:
- Unmodifieable List of values.
-
getValue
Deprecated.Get a value from a multiple value. If the value is not a multivalue, then index 0 retrieves the value or null.- Parameters:
name- The entry key.i- Index of element to get.- Returns:
- Unmodifieable List of values.
-
getString
Deprecated.Get value as String. Single valued items are converted to a String with the toString() Object method. Multi valued entries are converted to a comma separated List. No quoting of commas within values is performed.- Parameters:
name- The entry key.- Returns:
- String value.
-
put
Deprecated.Put multi valued entry.- Parameters:
name- The entry key.value- The simple value- Returns:
- The previous value or null.
-
putAllValues
Deprecated.Shorthand version of putAll- Parameters:
input- the input map
-
putValues
Deprecated.Put multi valued entry.- Parameters:
name- The entry key.values- The List of multiple values.- Returns:
- The previous value or null.
-
putValues
Deprecated.Put multi valued entry.- Parameters:
name- The entry key.values- The array of multiple values.- Returns:
- The previous value or null.
-
add
Deprecated.Add value to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry.- Parameters:
name- The entry key.value- The entry value.
-
addValues
Deprecated.Add values to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry.- Parameters:
name- The entry key.values- The List of multiple values.
-
addValues
Deprecated.Add values to multi valued entry. If the entry is single valued, it is converted to the first value of a multi valued entry.- Parameters:
name- The entry key.values- The String array of multiple values.
-
addAllValues
Deprecated.Merge values.- Parameters:
map- the map to overlay on top of this one, merging together values if needed.- Returns:
- true if an existing key was merged with potentially new values, false if either no change was made, or there were only new keys.
-
removeValue
Deprecated.Remove value.- Parameters:
name- The entry key.value- The entry value.- Returns:
- true if it was removed.
-
containsSimpleValue
Deprecated.Test for a specific single value in the map.NOTE: This is a SLOW operation, and is actively discouraged.
- Parameters:
value- the value to search for- Returns:
- true if contains simple value
-
toString
Deprecated.- Overrides:
toStringin classAbstractMap<String,List<V>>
-
toStringArrayMap
Deprecated.- Returns:
- Map of String arrays
-