RangeIndex Class

public class RangeIndex extends Index

Represents a range index in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
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);
</code></pre></p>

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);
</code></pre></p>
RangeIndex(JSONObject jsonObject)

Initializes a new instance of the RangeIndex class with json object.

RangeIndex(String jsonString)

Initializes a new instance of the RangeIndex class with json string.

Method Summary

Modifier and Type Method and Description
DataType getDataType()

Gets data type.

int getPrecision()

Gets precision.

void setDataType(DataType dataType)

Sets data type.

void setPrecision(int precision)

Sets precision.

Inherited Members

Constructor Details

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);
</code></pre></p>

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);
</code></pre></p>

Parameters:

dataType - the data type of the RangeIndex
precision - the precision of the RangeIndex

RangeIndex

public RangeIndex(JSONObject jsonObject)

Initializes a new instance of the RangeIndex class with json object.

Parameters:

jsonObject - the json object that represents the index.

RangeIndex

public RangeIndex(String jsonString)

Initializes a new instance of the RangeIndex class with json string.

Parameters:

jsonString - the json string that represents the index.

Method Details

getDataType

public DataType getDataType()

Gets data type.

Returns:

the data type.

getPrecision

public int getPrecision()

Gets precision.

Returns:

the precision.

setDataType

public void setDataType(DataType dataType)

Sets data type.

Parameters:

dataType - the data type.

setPrecision

public void setPrecision(int precision)

Sets precision.

Parameters:

precision - the precision.

Applies to