Class GenericQueryParams
- java.lang.Object
-
- io.streamthoughts.azkarra.api.query.GenericQueryParams
-
- All Implemented Interfaces:
QueryParams
public class GenericQueryParams extends Object implements QueryParams
-
-
Constructor Summary
Constructors Constructor Description GenericQueryParams()
Creates a newGenericQueryParams
instance.GenericQueryParams(Map<String,Object> params)
Creates a newGenericQueryParams
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(String key)
Checks whether thisQueryParams
contains the given key param.static GenericQueryParams
empty()
Map<String,Object>
getAsMap()
Gets all query params asMap
.Long
getLong(String key)
Gets the parameter as long for the given key.String
getString(String key)
Gets the parameter as string for the given key.<V> V
getValue(String key)
Gets the parameter for the given key.GenericQueryParams
put(String key, Object object)
-
-
-
Constructor Detail
-
GenericQueryParams
public GenericQueryParams()
Creates a newGenericQueryParams
instance.
-
GenericQueryParams
public GenericQueryParams(Map<String,Object> params)
Creates a newGenericQueryParams
instance.- Parameters:
params
- the key-value parameters.
-
-
Method Detail
-
empty
public static GenericQueryParams empty()
-
put
public GenericQueryParams put(String key, Object object)
-
getValue
public <V> V getValue(String key)
Gets the parameter for the given key.- Specified by:
getValue
in interfaceQueryParams
- Parameters:
key
- the parameter key.- Returns:
- the object value.
-
getString
public String getString(String key)
Gets the parameter as string for the given key.- Specified by:
getString
in interfaceQueryParams
- Parameters:
key
- the parameter key.- Returns:
- the string value.
-
getLong
public Long getLong(String key)
Gets the parameter as long for the given key.- Specified by:
getLong
in interfaceQueryParams
- Parameters:
key
- the parameter key.- Returns:
- the long value.
-
contains
public boolean contains(String key)
Checks whether thisQueryParams
contains the given key param.- Specified by:
contains
in interfaceQueryParams
- Parameters:
key
- the key params.- Returns:
true
if thisQueryParams
contains the given key.
-
-