Package org.jf.dexlib2.dexbacked.util
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:
java.util.Iterator<T>
public abstract class VariableSizeLookaheadIterator<T> extends com.google.common.collect.AbstractIterator<T> implements java.util.Iterator<T>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
VariableSizeLookaheadIterator(DexBuffer buffer, int offset)
-
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
-
-
-
-
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 simplyreturn endOfData()
- Returns:
- The item that was read. If endOfData was called, the return value is ignored.
-
computeNext
protected T computeNext()
- Specified by:
computeNext
in classcom.google.common.collect.AbstractIterator<T>
-
getReaderOffset
public final int getReaderOffset()
-
-