Package com.mongodb.client.model
Class IndexModel
java.lang.Object
com.mongodb.client.model.IndexModel
A model describing the creation of a single index.
- Since:
- 3.0
- MongoDB documentation
- Index options
-
Constructor Summary
ConstructorsConstructorDescriptionIndexModel(Bson keys) Construct an instance with the given keys.IndexModel(Bson keys, IndexOptions options) Construct an instance with the given keys and options.Method Summary
Modifier and TypeMethodDescriptiongetKeys()Gets the index keys.Gets the index options.toString()-
Constructor Details
-
IndexModel
Construct an instance with the given keys.- Parameters:
keys- the index keys
-
IndexModel
Construct an instance with the given keys and options.- Parameters:
keys- the index keysoptions- the index options
-
-
Method Details
-
getKeys
Gets the index keys.- Returns:
- the index keys
-
getOptions
Gets the index options.- Returns:
- the index options
-
toString
- Overrides:
Object
-