@Override
  public boolean hasNext() {
    // hasNext can return true when position == length in the case of a
    // nullable field trailing a struct.
    return idx < types.length && src.getPosition() <= src.getLength();
  }
Construct {@code StructIterator} over the values encoded in {@code src} using the specified
{@code types} definition.
@param src   The buffer from which to read encoded values.
@param types The sequence of types to use as the schema for this {@code Struct}.
hbase-common/src/main/java/org/apache/hadoop/hbase/types/StructIterator.java