Package org.apache.lucene.backward_codecs.lucene90

# Class Lucene90BoundsChecker

java.lang.Object
org.apache.lucene.backward_codecs.lucene90.Lucene90BoundsChecker

Direct Known Subclasses:
  `Lucene90BoundsChecker.Max`, `Lucene90BoundsChecker.Min`

public abstract class Lucene90BoundsChecker extends Object
A helper class for an hnsw graph that serves as a comparator of the currently set bound value with a new value.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `Lucene90BoundsChecker.Max`
  A helper class for an hnsw graph that serves as a comparator of the currently set maximum value with a new value.
  `static class`
  `Lucene90BoundsChecker.Min`
  A helper class for an hnsw graph that serves as a comparator of the currently set minimum value with a new value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Lucene90BoundsChecker()`
  Default Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract boolean`
  `check(float sample)`
  Check the sample
  `static Lucene90BoundsChecker`
  `create(boolean reversed)`
  Create a min or max bound checker
  `void`
  `set(float sample)`
  Update the bound unconditionally
  `abstract void`
  `update(float sample)`
  Update the bound if sample is better

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Lucene90BoundsChecker

    public Lucene90BoundsChecker()
    Default Constructor

- ## Method Details

  - ### update

    public abstract void update(float sample)
    Update the bound if sample is better

  - ### set

    public void set(float sample)
    Update the bound unconditionally

  - ### check

    public abstract boolean check(float sample)
    Check the sample
    Parameters:
      `sample` - a score
    Returns:
      whether the sample exceeds (is worse than) the bound

  - ### create

    public static Lucene90BoundsChecker create(boolean reversed)
    Create a min or max bound checker
    Parameters:
      `reversed` - true for the min and false for the max
    Returns:
      the bound checker