Package io.vertx.ext.mongo

## Class IndexModel

- java.lang.Object
- - io.vertx.ext.mongo.IndexModel

-     public class IndexModel
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IndexModel()` | Default constructor
    `IndexModel​(JsonObject json)` | Json constructor
    `IndexModel​(JsonObject key, IndexOptions options)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object o)` |
    `JsonObject` | `getKey()` | Get the index key
    `IndexOptions` | `getOptions()` | Get the index options
    `int` | `hashCode()` |
    `IndexModel` | `setKey​(JsonObject key)` | Sets the index key
    `IndexModel` | `setOptions​(IndexOptions options)` | Sets the index options
    `JsonObject` | `toJson()` | Convert to JSON
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### IndexModel

          public IndexModel()

      Default constructor

    - #### IndexModel

          public IndexModel​(JsonObject json)

      Json constructor
      Parameters:
        `json` - - the json object

    - #### IndexModel

          public IndexModel​(JsonObject key,
                            IndexOptions options)

  - ### Method Detail

    - #### getKey

          public JsonObject getKey()

      Get the index key
      Returns:
        - the index keys

    - #### setKey

          public IndexModel setKey​(JsonObject key)

      Sets the index key
      Parameters:
        `key` - - the index keys
      Returns:
        this for fluency

    - #### getOptions

          public IndexOptions getOptions()

      Get the index options
      Returns:
        - the index options

    - #### setOptions

          public IndexModel setOptions​(IndexOptions options)

      Sets the index options
      Parameters:
        `options` - - the index options
      Returns:
        this for fluency

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### 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`