Package org.dizitart.no2.index
Class IndexDescriptor
java.lang.Object
org.dizitart.no2.index.IndexDescriptor
- All Implemented Interfaces:
Serializable,Comparable<IndexDescriptor>
A class representing the descriptor of a Nitrite index.
- Since:
- 1.0
- Author:
- Anindya Chatterjee
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndexDescriptor(String indexType, Fields fields, String collectionName) Instantiates a new Index. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IndexDescriptor other) booleanGets the collection name.Gets the target fields for the index.Specifies the type of the index.inthashCode()booleanIndicates if this descriptor is for a compound index.voidsetCollectionName(String collectionName) Gets the collection name.voidGets the target fields for the index.voidsetIndexType(String indexType) Specifies the type of the index.toString()
-
Constructor Details
-
IndexDescriptor
Instantiates a new Index.- Parameters:
indexType- the index typefields- the valuecollectionName- the collection name
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<IndexDescriptor>
-
isCompoundIndex
public boolean isCompoundIndex()Indicates if this descriptor is for a compound index.- Returns:
- the boolean
-
setIndexType
Specifies the type of the index.- Parameters:
indexType- index type- See Also:
-
setFields
Gets the target fields for the index. -
setCollectionName
Gets the collection name.- Parameters:
collectionName- collection name
-
equals
-
hashCode
public int hashCode() -
toString
-
getIndexType
Specifies the type of the index.- Returns:
- the type of the index.
- See Also:
-
getFields
Gets the target fields for the index.- Returns:
- the target fields.
-
getCollectionName
Gets the collection name.- Returns:
- the collection name.
-