Interface INamedParameters
-
- All Known Implementing Classes:
PageParameters
public interface INamedParameters
Container for parameters that are identified by their name- Author:
- igor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
INamedParameters.NamedPair
Represents a named parameter entry.static class
INamedParameters.Type
A hint where the parameter is read/parsed from.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description INamedParameters
add(String name, Object value, int index, INamedParameters.Type type)
Adds named parameter to a specified position.INamedParameters
add(String name, Object value, INamedParameters.Type type)
Adds value to named parameter with given name.INamedParameters
clearNamed()
Removes all named parameters.StringValue
get(String name)
Returns parameter value of named parameter with given nameList<INamedParameters.NamedPair>
getAllNamed()
List<INamedParameters.NamedPair>
getAllNamedByType(INamedParameters.Type type)
Set<String>
getNamedKeys()
Return set of all named parameter names.int
getPosition(String name)
Returns the position of a named parameter.List<StringValue>
getValues(String name)
Return list of all values for named parameter with given nameINamedParameters
remove(String name, String... values)
Removes named parameter with given name.INamedParameters
set(String name, Object value, int index, INamedParameters.Type type)
Sets the named parameter on specified position.INamedParameters
set(String name, Object value, INamedParameters.Type type)
Sets the value for named parameter with given name.
-
-
-
Method Detail
-
getNamedKeys
Set<String> getNamedKeys()
Return set of all named parameter names.- Returns:
- named parameter names
-
get
StringValue get(String name)
Returns parameter value of named parameter with given name- Parameters:
name
-- Returns:
- parameter value
-
getValues
List<StringValue> getValues(String name)
Return list of all values for named parameter with given name- Parameters:
name
-- Returns:
- list of parameter values
-
getAllNamed
List<INamedParameters.NamedPair> getAllNamed()
- Returns:
- All named parameters in exact order.
-
getAllNamedByType
List<INamedParameters.NamedPair> getAllNamedByType(INamedParameters.Type type)
- Parameters:
type
- The type to filter- Returns:
- All named parameters with the given type. If the type is
null
then returns all named parameters.
-
getPosition
int getPosition(String name)
Returns the position of a named parameter.- Parameters:
name
- the name of the parameter to look for- Returns:
- the position of the parameter.
-1
if there is no parameter with that name.
-
remove
INamedParameters remove(String name, String... values)
Removes named parameter with given name.- Parameters:
name
- the name of the parameter to removevalues
- values used as criteria. The parameter will be removed only if its value is equal to any of the criteria.- Returns:
- this
-
add
INamedParameters add(String name, Object value, INamedParameters.Type type)
Adds value to named parameter with given name.- Parameters:
name
-value
-type
-- Returns:
- this
-
add
INamedParameters add(String name, Object value, int index, INamedParameters.Type type)
Adds named parameter to a specified position. TheIRequestMapper
s may or may not take the order into account.- Parameters:
name
-value
-index
-type
-- Returns:
- this
-
set
INamedParameters set(String name, Object value, int index, INamedParameters.Type type)
Sets the named parameter on specified position. TheIRequestMapper
s may or may not take the order into account.- Parameters:
name
-value
-index
-type
-- Returns:
- this
-
set
INamedParameters set(String name, Object value, INamedParameters.Type type)
Sets the value for named parameter with given name.- Parameters:
name
-value
-type
-- Returns:
- this
-
clearNamed
INamedParameters clearNamed()
Removes all named parameters.- Returns:
- this
-
-