io.vertx.ext.consul

## Class NodeList

- java.lang.Object
- - io.vertx.ext.consul.NodeList

-     public class NodeList
      extends Object

  Holds result of nodes query
  Author:
    Ruslan Sennov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NodeList()` Default constructor
    `NodeList(JsonObject json)` Constructor from JSON
    `NodeList(NodeList other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `long` | `getIndex()` Get Consul index
    `List<Node>` | `getList()` Get list of nodes
    `int` | `hashCode()`
    `NodeList` | `setIndex(long index)` Set Consul index, a unique identifier representing the current state of the requested list of nodes
    `NodeList` | `setList(List<Node> list)` Set list of nodes
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NodeList

          public NodeList()

      Default constructor

    - #### NodeList

          public NodeList(NodeList other)

      Copy constructor
      Parameters:
        `other` - the one to copy

    - #### NodeList

          public NodeList(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getIndex

          public long getIndex()

      Get Consul index
      Returns:
        the consul index

    - #### setIndex

          public NodeList setIndex(long index)

      Set Consul index, a unique identifier representing the current state of the requested list of nodes
      Parameters:
        `index` - the consul index
      Returns:
        reference to this, for fluency

    - #### getList

          public List<Node> getList()

      Get list of nodes
      Returns:
        the list of nodes

    - #### setList

          public NodeList setList(List<Node> list)

      Set list of nodes
      Parameters:
        `list` - the list of nodes
      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`

Copyright © 2023 Eclipse. All rights reserved.