Package org.basex.query.util.index
Class IndexCosts
java.lang.Object
org.basex.query.util.index.IndexCosts
- All Implemented Interfaces:
Comparable<IndexCosts>
Costs of index request.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IndexCostsEnforce index creation (dynamic query terms).static final IndexCostsEnforce index creation (static query terms).static final IndexCostsNo results. -
Method Summary
Modifier and TypeMethodDescriptionstatic IndexCostsadd(IndexCosts ic1, IndexCosts ic2) Adds index costs.intcompareTo(IndexCosts ic) static IndexCostsget(int results) Constructor.intresults()Number of expected results.booleantooExpensive(Data data) Checks if index access is too expensive.toString()
-
Field Details
-
ENFORCE_STATIC
Enforce index creation (static query terms). -
ENFORCE_DYNAMIC
Enforce index creation (dynamic query terms). -
ZERO
No results.
-
-
Method Details
-
get
Constructor.- Parameters:
results- number of expected results- Returns:
- costs
-
add
Adds index costs.- Parameters:
ic1- first costsic2- second costs- Returns:
- new costs
-
results
public int results()Number of expected results.- Returns:
- results
-
tooExpensive
Checks if index access is too expensive.- Parameters:
data- data reference (can benull)- Returns:
- result of check
-
compareTo
- Specified by:
compareToin interfaceComparable<IndexCosts>
-
toString
-