org.apache.cassandra.utils

## Class MerkleTree.TreeRangeIterator

- java.lang.Object
- - org.apache.cassandra.utils.AbstractIterator<MerkleTree.TreeRange>
  - - org.apache.cassandra.utils.MerkleTree.TreeRangeIterator

All Implemented Interfaces:
  com.google.common.collect.PeekingIterator<MerkleTree.TreeRange>, java.lang.Iterable<MerkleTree.TreeRange>, java.util.Iterator<MerkleTree.TreeRange>

Enclosing class:
  MerkleTree

    public static class MerkleTree.TreeRangeIterator
    extends AbstractIterator<MerkleTree.TreeRange>
    implements java.lang.Iterable<MerkleTree.TreeRange>, com.google.common.collect.PeekingIterator<MerkleTree.TreeRange>

Returns the leaf (range) of a given tree in increasing order. If the full range covered by the tree don't wrap, then it will return the ranges in increasing order. If the full range wrap, the first *and* last range returned by the iterator will be the wrapping range. It is the only case where the same leaf will be returned twice.

### Method Summary

All Methods Instance Methods Concrete Methods
`MerkleTree.TreeRange` `computeNext()` Find the next TreeRange.
`java.util.Iterator<MerkleTree.TreeRange>` `iterator()`

### Methods inherited from class org.apache.cassandra.utils.AbstractIterator

`endOfData, hasNext, next, peek, remove`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface com.google.common.collect.PeekingIterator

`next, peek, remove`

### Methods inherited from interface java.util.Iterator

`forEachRemaining, hasNext`

### Method Detail

#### computeNext

    public MerkleTree.TreeRange computeNext()

Find the next TreeRange.

Specified by:
  `computeNext` in class `AbstractIterator<MerkleTree.TreeRange>`
Returns:
  The next TreeRange.

#### iterator

    public java.util.Iterator<MerkleTree.TreeRange> iterator()

Specified by:
  `iterator` in interface `java.lang.Iterable<MerkleTree.TreeRange>`