Class VariableSizeLookaheadIterator<T>

java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<T>
org.jf.dexlib2.dexbacked.util.VariableSizeLookaheadIterator<T>
All Implemented Interfaces:
Iterator<T>

public abstract class VariableSizeLookaheadIterator<T> extends com.google.common.collect.AbstractIterator<T> implements Iterator<T>
  • Field Details

    • reader

      @Nonnull private final DexReader reader
  • Constructor Details

    • VariableSizeLookaheadIterator

      protected VariableSizeLookaheadIterator(@Nonnull DexBuffer buffer, int offset)
  • Method Details

    • readNextItem

      @Nullable protected abstract T readNextItem(@Nonnull DexReader reader)
      Reads the next item from reader. If the end of the list has been reached, it should call endOfData. endOfData has a return value of T, so you can simply return endOfData()
      Returns:
      The item that was read. If endOfData was called, the return value is ignored.
    • computeNext

      protected T computeNext()
      Specified by:
      computeNext in class com.google.common.collect.AbstractIterator<T>
    • getReaderOffset

      public final int getReaderOffset()