Class InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder

java.lang.Object
org.elasticsearch.xpack.esql.inference.InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder
Enclosing class:
InferenceOperator.BulkInferenceRequestItem

public static class InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder extends Object
Builder for constructing position value counts arrays dynamically. Each element in the array represents how many values a specific input position contributed.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addValue(int value)
    Adds a value count for the next position, expanding the buffer if necessary.
    int[]
    Builds the final position value counts array, optimizing for common cases.
    void
    Resets the builder to an empty state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • reset

      public void reset()
      Resets the builder to an empty state.
    • addValue

      public void addValue(int value)
      Adds a value count for the next position, expanding the buffer if necessary.
    • build

      public int[] build()
      Builds the final position value counts array, optimizing for common cases.