Package com.azure.data.cosmos
Class RangeIndex
- java.lang.Object
-
- com.azure.data.cosmos.JsonSerializable
-
- com.azure.data.cosmos.Index
-
- com.azure.data.cosmos.RangeIndex
-
public final class RangeIndex extends Index
Represents a range index in the Azure Cosmos DB database service.
-
-
Constructor Summary
Constructors Constructor Description RangeIndex(DataType dataType)
Initializes a new instance of the RangeIndex class with specified DataType.RangeIndex(DataType dataType, int precision)
Initializes a new instance of the RangeIndex class with specified DataType and precision.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataType
dataType()
Gets data type.RangeIndex
dataType(DataType dataType)
Sets data type.int
precision()
Gets precision.RangeIndex
precision(int precision)
Sets precision.-
Methods inherited from class com.azure.data.cosmos.JsonSerializable
get, getBoolean, getCollection, getDouble, getInt, getList, getLogger, getLong, getMap, getObject, getObjectByPath, getString, has, toJson, toJson, toObject, toString
-
-
-
-
Constructor Detail
-
RangeIndex
public RangeIndex(DataType dataType)
Initializes a new instance of the RangeIndex class with specified DataType.Here is an example to instantiate RangeIndex class passing in the DataType:
RangeIndex rangeIndex = new RangeIndex(DataType.NUMBER);
- Parameters:
dataType
- the data type.
-
RangeIndex
public RangeIndex(DataType dataType, int precision)
Initializes a new instance of the RangeIndex class with specified DataType and precision.RangeIndex rangeIndex = new RangeIndex(DataType.NUMBER, -1);
- Parameters:
dataType
- the data type of the RangeIndexprecision
- the precision of the RangeIndex
-
-
Method Detail
-
dataType
public DataType dataType()
Gets data type.- Returns:
- the data type.
-
dataType
public RangeIndex dataType(DataType dataType)
Sets data type.- Parameters:
dataType
- the data type.- Returns:
- the RangeIndex.
-
precision
public int precision()
Gets precision.- Returns:
- the precision.
-
precision
public RangeIndex precision(int precision)
Sets precision.- Parameters:
precision
- the precision.- Returns:
- the RangeIndex.
-
-