Package io.vertx.ext.consul
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 Summary
Constructors Constructor Description KeyValueList()Default constructorKeyValueList(JsonObject json)Constructor from JSONKeyValueList(KeyValueList other)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetIndex()Get Consul indexList<KeyValue>getList()Get list of key/value pairsinthashCode()booleanisPresent()Returntrueif there is a key/value pairs present, otherwisefalse.KeyValueListsetIndex(long index)Set Consul indexKeyValueListsetList(List<KeyValue> list)Set list of key/value pairsJsonObjecttoJson()Convert to JSON
-
-
-
Constructor Detail
-
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 Detail
-
toJson
public JsonObject toJson()
Convert to JSON- Returns:
- the JSON
-
isPresent
public boolean isPresent()
Returntrueif there is a key/value pairs present, otherwisefalse.- Returns:
trueif there is a key/value pairs present, otherwisefalse
-
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
-
-