Class IndexCosts

java.lang.Object
org.basex.query.util.index.IndexCosts
All Implemented Interfaces:
Comparable<IndexCosts>

public final class IndexCosts extends Object implements Comparable<IndexCosts>
Costs of index request.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • ENFORCE_STATIC

      public static final IndexCosts ENFORCE_STATIC
      Enforce index creation (static query terms).
    • ENFORCE_DYNAMIC

      public static final IndexCosts ENFORCE_DYNAMIC
      Enforce index creation (dynamic query terms).
    • ZERO

      public static final IndexCosts ZERO
      No results.
  • Method Details

    • get

      public static IndexCosts get(int results)
      Constructor.
      Parameters:
      results - number of expected results
      Returns:
      costs
    • add

      public static IndexCosts add(IndexCosts ic1, IndexCosts ic2)
      Adds index costs.
      Parameters:
      ic1 - first costs
      ic2 - second costs
      Returns:
      new costs
    • results

      public int results()
      Number of expected results.
      Returns:
      results
    • tooExpensive

      public boolean tooExpensive(Data data)
      Checks if index access is too expensive.
      Parameters:
      data - data reference (can be null)
      Returns:
      result of check
    • compareTo

      public int compareTo(IndexCosts ic)
      Specified by:
      compareTo in interface Comparable<IndexCosts>
    • toString

      public String toString()
      Overrides:
      toString in class Object