Class Table.TableIterator

java.lang.Object
org.jgroups.util.Table.TableIterator
All Implemented Interfaces:
Iterator<T>
Enclosing class:
Table<T>

protected class Table.TableIterator extends Object implements Iterator<T>
Iterates through all elements of the matrix. The range (from-to) can be defined, default is [hd+1 .. hr] (incl hr). Matrix compactions and resizings will lead to undefined results, as this iterator doesn't maintain a separate ref of the matrix, so it is best to run this with the lock held. This iterator is also used by Table.stream()
  • Field Details

    • row

      protected int row
    • column

      protected int column
    • current_row

      protected T[] current_row
    • from

      protected long from
    • to

      protected final long to
  • Constructor Details

    • TableIterator

      protected TableIterator()
    • TableIterator

      protected TableIterator(long from, long to)
  • Method Details

    • hasNext

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

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