Class URLParameters
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,String> SequencedMap<String,
String>
Represents URL parameters as a
LinkedHashMap
with the keys as the
parameter names and the values as the parameter values.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionSeeLinkedHashMap()
.URLParameters
(int initialCapacity) SeeLinkedHashMap(int)
.URLParameters
(int initialCapacity, float loadFactor) URLParameters
(int initialCapacity, float loadFactor, boolean accessOrder) URLParameters
(@NonNull Map<String, String> map) SeeLinkedHashMap(Map)
. -
Method Summary
Modifier and TypeMethodDescription@NonNull String
encode()
Encodes the URL parameters such that they can be used in aURL
or in a POST request.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
URLParameters
public URLParameters()SeeLinkedHashMap()
. -
URLParameters
SeeLinkedHashMap(Map)
. -
URLParameters
public URLParameters(int initialCapacity) SeeLinkedHashMap(int)
. -
URLParameters
public URLParameters(int initialCapacity, float loadFactor) -
URLParameters
public URLParameters(int initialCapacity, float loadFactor, boolean accessOrder)
-
-
Method Details
-
encode
Encodes the URL parameters such that they can be used in aURL
or in a POST request.- Returns:
- The encoded parameters as a
String
in the formatkey1=value1&key2=value2&...
- See Also:
-