Class VariableSizeLookaheadIterator<T>

  • All Implemented Interfaces:
    java.util.Iterator<T>

    public abstract class VariableSizeLookaheadIterator<T>
    extends com.google.common.collect.AbstractIterator<T>
    implements java.util.Iterator<T>
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected T computeNext()  
      int getReaderOffset()  
      protected abstract T readNextItem​(DexReader reader)
      Reads the next item from reader.
      • Methods inherited from class com.google.common.collect.AbstractIterator

        endOfData, hasNext, next, peek
      • Methods inherited from class com.google.common.collect.UnmodifiableIterator

        remove
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Constructor Detail

      • VariableSizeLookaheadIterator

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

      • 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()