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 Details

    • Parameters

      public Parameters()
  • Method Details

    • and

      public Parameters and(String name, Object value)
      Add a parameter to this Parameters.
      Parameters:
      name - name of the parameter to add
      value - value of the parameter to add
      Returns:
      this instance, modified.
    • map

      public Map<String,Object> map()
      Constructs an unmodifiable Map with the current parameters.
      Returns:
      an unmodifiable Map with the current parameters.
    • with

      public static Parameters with(String name, Object value)
      Build a Parameters with a single parameter.
      Parameters:
      name - name of the first parameter
      value - value of the first parameter
      Returns:
      a Parameters with a single parameter.