Class KeyValueList

java.lang.Object
io.vertx.ext.consul.KeyValueList

public class KeyValueList extends Object
Holds result of key/value pairs query
Author:
Ruslan Sennov
  • Constructor Details

    • KeyValueList

      public KeyValueList()
      Default constructor
    • KeyValueList

      public KeyValueList(KeyValueList other)
      Copy constructor
      Parameters:
      other - the one to copy
    • KeyValueList

      public KeyValueList(JsonObject json)
      Constructor from JSON
      Parameters:
      json - the JSON
  • Method Details

    • toJson

      public JsonObject toJson()
      Convert to JSON
      Returns:
      the JSON
    • isPresent

      public boolean isPresent()
      Return true if there is a key/value pairs present, otherwise false.
      Returns:
      true if there is a key/value pairs present, otherwise false
    • getIndex

      public long getIndex()
      Get Consul index
      Returns:
      the consul index
    • setIndex

      public KeyValueList setIndex(long index)
      Set Consul index
      Parameters:
      index - the consul index
      Returns:
      reference to this, for fluency
    • getList

      public List<KeyValue> getList()
      Get list of key/value pairs
      Returns:
      list of key/value pairs
    • setList

      public KeyValueList setList(List<KeyValue> list)
      Set list of key/value pairs
      Parameters:
      list - list of key/value pairs
      Returns:
      reference to this, for fluency
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object