Class VariableSizeListIterator<T>

java.lang.Object
org.jf.dexlib2.dexbacked.util.VariableSizeListIterator<T>
All Implemented Interfaces:
Iterator<T>, ListIterator<T>

public abstract class VariableSizeListIterator<T> extends Object implements ListIterator<T>
  • Field Details

    • reader

      @Nonnull private DexReader<? extends DexBuffer> reader
    • size

      protected final int size
    • startOffset

      private final int startOffset
    • index

      private int index
  • Constructor Details

    • VariableSizeListIterator

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

    • readNextItem

      protected abstract T readNextItem(@Nonnull DexReader<? extends DexBuffer> reader, int index)
      Reads the next item from reader.
      Parameters:
      reader - The DexReader to read the next item from
      index - The index of the item being read. This is guaranteed to be less than size
      Returns:
      The item that was read
    • getReaderOffset

      public int getReaderOffset()
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
      Specified by:
      hasNext in interface ListIterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
      Specified by:
      next in interface ListIterator<T>
    • hasPrevious

      public boolean hasPrevious()
      Specified by:
      hasPrevious in interface ListIterator<T>
    • previous

      public T previous()
      Specified by:
      previous in interface ListIterator<T>
    • nextIndex

      public int nextIndex()
      Specified by:
      nextIndex in interface ListIterator<T>
    • previousIndex

      public int previousIndex()
      Specified by:
      previousIndex in interface ListIterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>
      Specified by:
      remove in interface ListIterator<T>
    • set

      public void set(T t)
      Specified by:
      set in interface ListIterator<T>
    • add

      public void add(T t)
      Specified by:
      add in interface ListIterator<T>