Package com.linecorp.armeria.common
Interface QueryParamsBuilder
public interface QueryParamsBuilder
Builds a
QueryParams
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds all parameter names and values of the specifiedentries
.Adds new parameters with the specifiedname
andvalues
.Adds a new parameter with the specifiedname
andvalue
.Adds new parameters with the specifiedname
andvalues
.default QueryParamsBuilder
Adds all parameter names and values of the specifiedentries
.Adds a new parameter.Adds a new parameter.Adds a new parameter.Adds a new parameter.Adds all parameter names and values of the specifiedentries
.Adds a new parameter with the specified name and values.Adds a new parameter.Adds a new parameter with the specified name and values.addTimeMillis
(String name, long value) Adds a new parameter.default StringBuilder
Encodes all parameter entries into a query string, as defined in 4.10.22.6, HTML5 W3C Recommendation, and appends it into the specifiedStringBuilder
.build()
Returns a newly createdQueryParams
with the entries in this builder.clear()
Removes all parameters.boolean
Returnstrue
if a parameter with thename
exists,false
otherwise.boolean
Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsBoolean
(String name, boolean value) Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsDouble
(String name, double value) Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsFloat
(String name, float value) Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsInt
(String name, int value) Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsLong
(String name, long value) Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsObject
(String name, Object value) Returnstrue
if a parameter with thename
andvalue
exists.boolean
containsTimeMillis
(String name, long value) Returnstrue
if a parameter with thename
andvalue
exists.void
forEach
(BiConsumer<String, String> action) Invokes the specifiedaction
for all parameter entries.void
forEachValue
(String name, Consumer<String> action) Invokes the specifiedaction
for all values of the parameters with the specifiedname
.Returns the value of a parameter with the specifiedname
.Returns the value of a parameter with the specifiedname
.Returns all values for the parameter with the specified name.getAllAndRemove
(String name) Removes all the parameters with the specified name and returns the removed parameter values.getAndRemove
(String name) Removes all the parameters with the specified name and returns the parameter value which was added first.getAndRemove
(String name, String defaultValue) Removes all the parameters with the specified name and returns the parameter value which was added first.getBoolean
(String name) Returns theboolean
value of a parameter with the specifiedname
.boolean
getBoolean
(String name, boolean defaultValue) Returns theboolean
value of a parameter with the specifiedname
.Returns thedouble
value of a parameter with the specifiedname
.double
Returns thedouble
value of a parameter with the specifiedname
.getDoubleAndRemove
(String name) Removes all the parameters with the specified name and returns the parameter value which was added first.double
getDoubleAndRemove
(String name, double defaultValue) Removes all the parameters with the specified name and returns the parameter value which was added first.Returns thefloat
value of a parameter with the specifiedname
.float
Returns thefloat
value of a parameter with the specifiedname
.getFloatAndRemove
(String name) Removes all the parameters with the specified name and returns the parameter value which was added first.float
getFloatAndRemove
(String name, float defaultValue) Removes all the parameters with the specified name and returns the parameter value which was added first.Returns theint
value of a parameter with the specifiedname
.int
Returns theint
value of a parameter with the specifiedname
.getIntAndRemove
(String name) Removes all the parameters with the specified name and returns the parameter value which was added first.int
getIntAndRemove
(String name, int defaultValue) Removes all the parameters with the specified name and returns the parameter value which was added first.Returns the value of a parameter with the specifiedname
.Returns the value of a parameter with the specifiedname
.getLastBoolean
(String name) Returns theboolean
value of a parameter with the specifiedname
.boolean
getLastBoolean
(String name, boolean defaultValue) Returns theboolean
value of a parameter with the specifiedname
.getLastDouble
(String name) Returns thedouble
value of a parameter with the specifiedname
.double
getLastDouble
(String name, double defaultValue) Returns thedouble
value of a parameter with the specifiedname
.getLastFloat
(String name) Returns thefloat
value of a parameter with the specifiedname
.float
getLastFloat
(String name, float defaultValue) Returns thefloat
value of a parameter with the specifiedname
.getLastInt
(String name) Returns theint
value of a parameter with the specifiedname
.int
getLastInt
(String name, int defaultValue) Returns theint
value of a parameter with the specifiedname
.getLastLong
(String name) Returns thelong
value of a parameter with the specifiedname
.long
getLastLong
(String name, long defaultValue) Returns thelong
value of a parameter with the specifiedname
.getLastTimeMillis
(String name) Returns the value of a parameter with the specifiedname
in milliseconds.long
getLastTimeMillis
(String name, long defaultValue) Returns the value of a parameter with the specifiedname
in milliseconds.Returns thelong
value of a parameter with the specifiedname
.long
Returns thelong
value of a parameter with the specifiedname
.getLongAndRemove
(String name) Removes all the parameters with the specified name and returns the parameter value which was added first.long
getLongAndRemove
(String name, long defaultValue) Removes all the parameters with the specified name and returns the parameter value which was added first.getTimeMillis
(String name) Returns the value of a parameter with the specifiedname
in milliseconds.long
getTimeMillis
(String name, long defaultValue) Returns the value of a parameter with the specifiedname
in milliseconds.getTimeMillisAndRemove
(String name) Removes all the parameters with the specified name and returns the parameter value which was added first.long
getTimeMillisAndRemove
(String name, long defaultValue) Removes all the parameters with the specified name and returns the parameter value which was added first.boolean
isEmpty()
Returnstrue
if this parameters does not contain any entries.iterator()
Returns anIterator
that yields all parameter entries.names()
Returns aSet
of all parameter names.boolean
Removes all parameters with the specifiedname
.removeAndThen
(String name) Removes all parameters with the specifiedname
.Retains all current parameters but callsset(String, String)
for each entry in the specifiedentries
.Sets a new parameter with the specified name and values.Sets a parameter with the specified name and value.Sets a parameter with the specified name and values.default QueryParamsBuilder
Retains all current parameters but callsset(String, String)
for each entry in the specifiedentries
.Sets a parameter with the specifiedname
tovalue
.Sets a parameter with the specifiedname
tovalue
.setIfAbsent
(Iterable<? extends Map.Entry<? extends String, String>> entries) Copies the entries missing in this parameters from the specifiedentries
.Sets a parameter with the specifiedname
tovalue
.Sets a parameter with the specifiedname
tovalue
.Retains all current parameters but callssetObject(String, Object)
for each entry in the specifiedentries
.Sets a parameter with the specified name and values.Sets a new parameter.Sets a parameter with the specified name and values.setTimeMillis
(String name, long value) Sets a parameter with the specifiedname
tovalue
.int
size()
Returns the number of parameters.sizeHint
(int sizeHint) Specifies the hint about the number of parameters which may improve the memory efficiency and performance of the underlying data structure.stream()
Returns aStream
that yields all parameter entries.default String
Encodes all parameter entries into a query string, as defined in 4.10.22.6, HTML5 W3C Recommendation.valueIterator
(String name) Returns anIterator
that yields all values of the parameters with the specifiedname
.valueStream
(String name) Returns aStream
that yields all values of the parameters with the specifiedname
.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
build
QueryParams build()Returns a newly createdQueryParams
with the entries in this builder. -
sizeHint
Specifies the hint about the number of parameters which may improve the memory efficiency and performance of the underlying data structure.- Returns:
this
- Throws:
IllegalStateException
- if the hint was specified too late after the underlying data structure has been fully initialized.
-
getAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter name- Returns:
- the first parameter value or
null
if there is no such parameter
-
getAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the first parameter value or
defaultValue
if there is no such parameter
-
getAllAndRemove
Removes all the parameters with the specified name and returns the removed parameter values. -
getIntAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter name- Returns:
- the
int
value of the first value in insertion order ornull
if there is no such value or it can't be converted intoint
.
-
getIntAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
int
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted intoint
.
-
getLongAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter name- Returns:
- the
long
value of the first value in insertion order ornull
if there is no such value or it can't be converted intolong
.
-
getLongAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
long
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted intolong
.
-
getFloatAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter name- Returns:
- the
float
value of the first value in insertion order ornull
if there is no such value or it can't be converted intofloat
.
-
getFloatAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
float
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted intofloat
.
-
getDoubleAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter name- Returns:
- the
double
value of the first value in insertion order ornull
if there is no such value or it can't be converted intodouble
.
-
getDoubleAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
double
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted intodouble
.
-
getTimeMillisAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter name- Returns:
- the milliseconds value of the first value in insertion order or
null
if there is no such value or it can't be converted into milliseconds.
-
getTimeMillisAndRemove
Removes all the parameters with the specified name and returns the parameter value which was added first.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the milliseconds value of the first value in insertion order or
defaultValue
if there is no such value or it can't be converted into milliseconds.
-
add
Adds a new parameter with the specifiedname
andvalue
.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
add
Adds new parameters with the specifiedname
andvalues
. This method is semantically equivalent tofor (String value : values) { builder.add(name, value); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
add
Adds new parameters with the specifiedname
andvalues
. This method is semantically equivalent tofor (String value : values) { builder.add(name, value); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
add
Adds all parameter names and values of the specifiedentries
.- Returns:
this
- Throws:
IllegalArgumentException
- ifentries == this
.
-
add
Adds all parameter names and values of the specifiedentries
.- Returns:
this
-
addObject
Adds a new parameter. The specified parameter value is converted into aString
, as explained in Specifying a non-String parameter value.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
addObject
Adds a new parameter with the specified name and values. The specified parameter values are converted intoString
s, as explained in Specifying a non-String parameter value. This method is equivalent to:for (Object v : values) { builder.addObject(name, v); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
addObject
Adds a new parameter with the specified name and values. The specified parameter values are converted intoString
s, as explained in Specifying a non-String parameter value. This method is equivalent to:for (Object v : values) { builder.addObject(name, v); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
addObject
Adds all parameter names and values of the specifiedentries
. The specified parameter values are converted intoString
s, as explained in Specifying a non-String parameter value.- Returns:
this
- Throws:
IllegalArgumentException
- ifentries == this
.
-
addInt
Adds a new parameter.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
addLong
Adds a new parameter.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
addFloat
Adds a new parameter.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
addDouble
Adds a new parameter.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
addTimeMillis
Adds a new parameter.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
set
Sets a parameter with the specified name and value. Any existing parameters with the same name are overwritten.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
set
Sets a new parameter with the specified name and values. This method is equivalent tobuilder.remove(name); for (String v : values) { builder.add(name, v); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
set
Sets a parameter with the specified name and values. Any existing parameters with the specified name are removed. This method is equivalent to:builder.remove(name); for (String v : values) { builder.add(name, v); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
set
Retains all current parameters but callsset(String, String)
for each entry in the specifiedentries
.- Parameters:
entries
- the parameters used to set the parameter values- Returns:
this
-
set
Retains all current parameters but callsset(String, String)
for each entry in the specifiedentries
.- Parameters:
entries
- the parameters used to set the parameter values- Returns:
this
-
setIfAbsent
Copies the entries missing in this parameters from the specifiedentries
. This method is a shortcut for:entries.names().forEach(name -> { if (!builder.contains(name)) { builder.set(name, entries.getAll(name)); } });
- Returns:
this
-
setObject
Sets a new parameter. Any existing parameters with the specified name are removed. The specified parameter value is converted into aString
, as explained in Specifying a non-String parameter value.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
setObject
Sets a parameter with the specified name and values. Any existing parameters with the specified name are removed. The specified parameter values are converted intoString
s, as explained in Specifying a non-String parameter value. This method is equivalent to:builder.remove(name); for (Object v : values) { builder.addObject(name, v); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
setObject
Sets a parameter with the specified name and values. Any existing parameters with the specified name are removed. The specified parameter values are converted intoString
s, as explained in Specifying a non-String parameter value. This method is equivalent to:builder.remove(name); for (Object v : values) { builder.addObject(name, v); }
- Parameters:
name
- the parameter namevalues
- the parameter values- Returns:
this
-
setObject
Retains all current parameters but callssetObject(String, Object)
for each entry in the specifiedentries
. The specified parameter values are converted intoString
s, as explained in Specifying a non-String parameter value.- Parameters:
entries
- the parameters used to set the values in this instance- Returns:
this
-
setInt
Sets a parameter with the specifiedname
tovalue
. This will remove all previous values associated withname
.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
setLong
Sets a parameter with the specifiedname
tovalue
. This will remove all previous values associated withname
.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
setFloat
Sets a parameter with the specifiedname
tovalue
. This will remove all previous values associated withname
.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
setDouble
Sets a parameter with the specifiedname
tovalue
. This will remove all previous values associated withname
.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
setTimeMillis
Sets a parameter with the specifiedname
tovalue
. This will remove all previous values associated withname
.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
this
-
remove
Removes all parameters with the specifiedname
.- Parameters:
name
- the parameter name- Returns:
true
if at least one entry has been removed.
-
removeAndThen
Removes all parameters with the specifiedname
. Unlikeremove(String)
this method returns itself so that the caller can chain the invocations.- Parameters:
name
- the parameter name- Returns:
this
-
clear
QueryParamsBuilder clear()Removes all parameters. After a call to this method,size()
becomes0
.- Returns:
this
-
get
Returns the value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the first parameter value if found, or
null
if there is no such parameter
-
get
Returns the value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the first parameter value, or
defaultValue
if there is no such parameter
-
getLast
Returns the value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the last parameter value if found, or
null
if there is no such parameter
-
getLast
Returns the value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the last parameter value, or
defaultValue
if there is no such parameter
-
getAll
Returns all values for the parameter with the specified name. The returnedList
can't be modified. -
getBoolean
Returns theboolean
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
boolean
value of the first value in insertion order ornull
if there is no such parameter or it can't be converted toboolean
.
-
getBoolean
Returns theboolean
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
boolean
value of the first value in insertion order ordefaultValue
if there is no such parameter or it can't be converted toboolean
.
-
getLastBoolean
Returns theboolean
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
boolean
value of the last value in insertion order ornull
if there is no such parameter or it can't be converted toboolean
.
-
getLastBoolean
Returns theboolean
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
boolean
value of the last value in insertion order ordefaultValue
if there is no such parameter or it can't be converted toboolean
.
-
getInt
Returns theint
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
int
value of the first value in insertion order ornull
if there is no such parameter or it can't be converted toint
.
-
getInt
Returns theint
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
int
value of the first value in insertion order ordefaultValue
if there is no such parameter or it can't be converted toint
.
-
getLastInt
Returns theint
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
int
value of the last value in insertion order ornull
if there is no such parameter or it can't be converted toint
.
-
getLastInt
Returns theint
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
int
value of the last value in insertion order ordefaultValue
if there is no such parameter or it can't be converted toint
.
-
getLong
Returns thelong
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
long
value of the first value in insertion order ornull
if there is no such parameter or it can't be converted tolong
.
-
getLong
Returns thelong
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
long
value of the first value in insertion order ordefaultValue
if there is no such parameter or it can't be converted tolong
.
-
getLastLong
Returns thelong
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
long
value of the last value in insertion order ornull
if there is no such parameter or it can't be converted tolong
.
-
getLastLong
Returns thelong
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
long
value of the last value in insertion order ordefaultValue
if there is no such parameter or it can't be converted tolong
.
-
getFloat
Returns thefloat
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
float
value of the first value in insertion order ornull
if there is no such parameter or it can't be converted tofloat
.
-
getFloat
Returns thefloat
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
float
value of the first value in insertion order ordefaultValue
if there is no such parameter or it can't be converted tofloat
.
-
getLastFloat
Returns thefloat
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
float
value of the last value in insertion order ornull
if there is no such parameter or it can't be converted tofloat
.
-
getLastFloat
Returns thefloat
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
float
value of the last value in insertion order ordefaultValue
if there is no such parameter or it can't be converted tofloat
.
-
getDouble
Returns thedouble
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
double
value of the first value in insertion order ornull
if there is no such parameter or it can't be converted todouble
.
-
getDouble
Returns thedouble
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
double
value of the first value in insertion order ordefaultValue
if there is no such parameter or it can't be converted todouble
.
-
getLastDouble
Returns thedouble
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the
double
value of the last value in insertion order ornull
if there is no such parameter or it can't be converted todouble
.
-
getLastDouble
Returns thedouble
value of a parameter with the specifiedname
. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the
double
value of the last value in insertion order ordefaultValue
if there is no such parameter or it can't be converted todouble
.
-
getTimeMillis
Returns the value of a parameter with the specifiedname
in milliseconds. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the milliseconds value of the first value in insertion order or
null
if there is no such parameter or it can't be converted to milliseconds.
-
getTimeMillis
Returns the value of a parameter with the specifiedname
in milliseconds. If there are more than one value for the specifiedname
, the first value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the milliseconds value of the first value in insertion order or
defaultValue
if there is no such parameter or it can't be converted to milliseconds.
-
getLastTimeMillis
Returns the value of a parameter with the specifiedname
in milliseconds. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter name- Returns:
- the milliseconds value of the last value in insertion order or
null
if there is no such parameter or it can't be converted to milliseconds.
-
getLastTimeMillis
Returns the value of a parameter with the specifiedname
in milliseconds. If there are more than one value for the specifiedname
, the last value in insertion order is returned.- Parameters:
name
- the parameter namedefaultValue
- the default value- Returns:
- the milliseconds value of the last value in insertion order or
defaultValue
if there is no such parameter or it can't be converted to milliseconds.
-
contains
Returnstrue
if a parameter with thename
exists,false
otherwise.- Parameters:
name
- the parameter name
-
contains
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value to find
-
containsObject
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
containsBoolean
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
containsInt
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
containsLong
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
containsFloat
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
containsDouble
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
containsTimeMillis
Returnstrue
if a parameter with thename
andvalue
exists.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
true
if the parameter exists.false
otherwise
-
size
int size()Returns the number of parameters. -
isEmpty
boolean isEmpty()Returnstrue
if this parameters does not contain any entries. -
names
-
iterator
Returns anIterator
that yields all parameter entries. -
valueIterator
Returns anIterator
that yields all values of the parameters with the specifiedname
. -
forEach
Invokes the specifiedaction
for all parameter entries. -
forEachValue
Invokes the specifiedaction
for all values of the parameters with the specifiedname
. -
stream
Returns aStream
that yields all parameter entries. -
valueStream
Returns aStream
that yields all values of the parameters with the specifiedname
. -
toQueryString
Encodes all parameter entries into a query string, as defined in 4.10.22.6, HTML5 W3C Recommendation.- Returns:
- the encoded query string.
-
appendQueryString
Encodes all parameter entries into a query string, as defined in 4.10.22.6, HTML5 W3C Recommendation, and appends it into the specifiedStringBuilder
.- Returns:
- the specified
StringBuilder
for method chaining.
-