Class Variables

java.lang.Object
io.vertx.rxjava3.uritemplate.Variables
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class Variables extends Object implements io.vertx.lang.rx.RxDelegate
Holds a set of name/value pairs where each value can be a String or a List or a Mapinvalid input: '<'String, String>.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<Variables> __TYPE_ARG
  • Constructor Details

    • Variables

      public Variables(Variables delegate)
    • Variables

      public Variables(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDelegate

      public Variables getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • variables

      public static Variables variables()
      Returns:
      an empty instance
    • variables

      public static Variables variables(JsonObject json)
      Create an instance populated from a JSON object:
      • null are conserved
      • JsonArray is converted to List
      • JsonObject is converted to Mapinvalid input: '<'String, String>
      • any other value is converted to a string
      Note that nested JSON elements are converted to a string, so { "user": { "first_name": "John", "last_name": "Doe", "address" : { "city": "Paris", etc... } } } flattens the JSON "address" to the string "{\"city\":\"Paris\",etc...}".
      Parameters:
      json - the json that populates the returned variables
      Returns:
      an instance populated from a JSON object
    • set

      public Variables set(String name, String value)
      Set a single variable.
      Parameters:
      name - the variable name
      value - the variable value
      Returns:
      a reference to this, so the API can be used fluently
    • set

      public Variables set(String name, List<String> value)
      Set a list variable.
      Parameters:
      name - the variable name
      value - the variable value
      Returns:
      a reference to this, so the API can be used fluently
    • set

      public Variables set(String name, Map<String,String> value)
      Set a map variable.
      Parameters:
      name - the variable name
      value - the variable value
      Returns:
      a reference to this, so the API can be used fluently
    • setAll

      public Variables setAll(JsonObject json)
      Like addAll(JsonObject) but overwrites previous variables.
      Parameters:
      json -
      Returns:
    • addAll

      public Variables addAll(JsonObject json)
      Populates with a JSON object:
      • null are conserved
      • JsonArray is converted to List
      • JsonObject is converted to Mapinvalid input: '<'String, String>
      • any other value is converted to a string
      Note that nested JSON elements are converted to a string, so { "user": { "first_name": "John", "last_name": "Doe", "address" : { "city": "Paris", etc... } } } flattens the JSON "address" to the string "{\"city\":\"Paris\",etc...}".
      Parameters:
      json - the json that populates the returned variables
      Returns:
      a reference to this, so the API can be used fluently
    • clear

      public Variables clear()
    • names

      public Set<String> names()
      Returns:
      the set of variable names
    • get

      public Object get(String name)
      Parameters:
      name -
      Returns:
      the value of the variable name
    • getSingle

      public String getSingle(String name)
      Parameters:
      name -
      Returns:
      the single value of the variable name
    • getList

      public List<String> getList(String name)
      Parameters:
      name -
      Returns:
      the list value of the variable name
    • getMap

      public Map<String,String> getMap(String name)
      Parameters:
      name -
      Returns:
      the map value of the variable name
    • newInstance

      public static Variables newInstance(Variables arg)