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 boolean
equals(Object o)
long
getIndex()
Get Consul indexList<KeyValue>
getList()
Get list of key/value pairsint
hashCode()
boolean
isPresent()
Returntrue
if there is a key/value pairs present, otherwisefalse
.KeyValueList
setIndex(long index)
Set Consul indexKeyValueList
setList(List<KeyValue> list)
Set list of key/value pairsJsonObject
toJson()
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()
Returntrue
if there is a key/value pairs present, otherwisefalse
.- Returns:
true
if 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
-
-