Class FieldIteratorHelper

java.lang.Object
com.pervasive.datarush.tokens.record.FieldIteratorHelper

public final class FieldIteratorHelper extends Object
Utility class for constructing field iterators associated with a given record type.
  • Constructor Details

    • FieldIteratorHelper

      public FieldIteratorHelper(RecordTokenType recordType, FieldIteratorProperties properties)
      Create a new FieldIteratorHelper.
      Parameters:
      recordType - The type of record on which this helper will create iterators
      properties - properties for the field iterator
  • Method Details

    • newFieldIterator

      public ScalarValuedIterator newFieldIterator(RecordValued record)
      Invokes RecordValued.newFieldIterator(ScalarTokenType, String[]), specifying the iteratorType and selectedFields arguments that were passed to this object's constructor.
      Parameters:
      record - The record on which to create an iterator.
      Returns:
      A newly created iterator.
    • getRelativeIndex

      public int getRelativeIndex(ScalarValuedIterator iterator)
      Returns the index of the current field, relative to the selectedFields argument passed to this object's constructor.
      Parameters:
      iterator - A valid iterator, positioned on a field.
      Returns:
      the index of the current field in the iterator, relative to the selectedFields argument.