Package io.quarkus.panache.common
Class Parameters
- java.lang.Object
-
- io.quarkus.panache.common.Parameters
-
public class Parameters extends Object
Utility class to build populated `Map` instances. Page instances are mutable (builder-like).
Usage:
Map<String, Object> params = Parameters.with("foo", foo) .and("bar", bar) .and("gee", gee) .map();
- Author:
- Stéphane Épardaud
-
-
Constructor Summary
Constructors Constructor Description Parameters()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Parameters
and(String name, Object value)
Add a parameter to thisParameters
.Map<String,Object>
map()
Constructs an unmodifiableMap
with the current parameters.static Parameters
with(String name, Object value)
Build aParameters
with a single parameter.
-
-
-
Method Detail
-
and
public Parameters and(String name, Object value)
Add a parameter to thisParameters
.- Parameters:
name
- name of the parameter to addvalue
- value of the parameter to add- Returns:
- this instance, modified.
-
map
public Map<String,Object> map()
Constructs an unmodifiableMap
with the current parameters.- Returns:
- an unmodifiable
Map
with the current parameters.
-
with
public static Parameters with(String name, Object value)
Build aParameters
with a single parameter.- Parameters:
name
- name of the first parametervalue
- value of the first parameter- Returns:
- a
Parameters
with a single parameter.
-
-