org.h2.mvstore.rtree

## Class MVRTreeMap.RTreeCursor<V>

- java.lang.Object
- - org.h2.mvstore.rtree.MVRTreeMap.RTreeCursor<V>

All Implemented Interfaces:
  java.util.Iterator<Spatial>

Enclosing class:
  MVRTreeMap<V>

    public abstract static class MVRTreeMap.RTreeCursor<V>
    extends java.lang.Object
    implements java.util.Iterator<Spatial>

A cursor to iterate over a subset of the keys.

### Constructor Summary

Constructors
`protected` `RTreeCursor(Page<Spatial,V> root, Spatial filter)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract boolean` `check(boolean leaf, Spatial key, Spatial test)` Check a given key.
`boolean` `hasNext()`
`Spatial` `next()`
`void` `skip(long n)` Skip over that many entries.

### 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, remove`

### Constructor Detail

#### RTreeCursor

    protected RTreeCursor(Page<Spatial,V> root,
                          Spatial filter)

### Method Detail

#### hasNext

    public boolean hasNext()

Specified by:
  `hasNext` in interface `java.util.Iterator<Spatial>`

#### skip

    public void skip(long n)

Skip over that many entries. This method is relatively fast (for this map implementation) even if many entries need to be skipped.

Parameters:
  `n` - the number of entries to skip

#### next

    public Spatial next()

Specified by:
  `next` in interface `java.util.Iterator<Spatial>`

#### check

    protected abstract boolean check(boolean leaf,
                                     Spatial key,
                                     Spatial test)

Check a given key.

Parameters:
  `leaf` - if the key is from a leaf page
  `key` - the stored key
  `test` - the user-supplied test key
Returns:
  true if there is a match