org.h2.mvstore.rtree

## Class MVRTreeMap.RTreeCursor

- java.lang.Object
- - org.h2.mvstore.rtree.MVRTreeMap.RTreeCursor

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

Enclosing class:
  MVRTreeMap<V>

    public static class MVRTreeMap.RTreeCursor
    extends java.lang.Object
    implements java.util.Iterator<SpatialKey>

A cursor to iterate over a subset of the keys.

### Constructor Summary

Constructors
`protected` `MVRTreeMap.RTreeCursor(Page root, SpatialKey filter)`

### Method Summary

Methods
`protected boolean` `check(boolean leaf, SpatialKey key, SpatialKey test)` Check a given key.
`protected void` `fetchNext()` Fetch the next entry if there is one.
`boolean` `hasNext()`
`SpatialKey` `next()`
`void` `remove()`
`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`

### Constructor Detail

#### MVRTreeMap.RTreeCursor

    protected MVRTreeMap.RTreeCursor(Page root,
                          SpatialKey filter)

### Method Detail

#### hasNext

    public boolean hasNext()

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

#### 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 SpatialKey next()

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

#### remove

    public void remove()

Specified by:
  `remove` in interface `java.util.Iterator<SpatialKey>`

#### fetchNext

    protected void fetchNext()

Fetch the next entry if there is one.

#### check

    protected boolean check(boolean leaf,
                SpatialKey key,
                SpatialKey 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