com.bigdata.btree
Interface ILeafCursor<L extends Leaf>

All Superinterfaces:
Cloneable
All Known Implementing Classes:
BTree.LeafCursor, IndexSegment.ImmutableLeafCursor

public interface ILeafCursor<L extends Leaf>
extends Cloneable

Leaf cursor interface.

Version:
$Id: ILeafCursor.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 ILeafCursor<L> clone()
          Clone the cursor.
 L first()
          Return the first leaf.
 AbstractBTree getBTree()
          The backing B+Tree.
 L last()
          Return the last leaf.
 L leaf()
          The current leaf (always defined).
 L next()
          Return the next leaf in the natural order of the B+Tree.
 L prior()
          Return the previous leaf in the natural order of the B+Tree.
 L seek(byte[] key)
          Find the leaf that would span the key.
 L seek(ILeafCursor<L> src)
          Position this cursor on the same leaf as the given cursor.
 

Method Detail

getBTree

AbstractBTree getBTree()
The backing B+Tree.


leaf

L leaf()
The current leaf (always defined).


first

L first()
Return the first leaf.


last

L last()
Return the last leaf.


seek

L seek(byte[] key)
Find the leaf that would span the key.

Parameters:
key - The key
Returns:
The leaf which would span that key and never null.
Throws:
IllegalArgumentException - if the key is null.

seek

L seek(ILeafCursor<L> src)
Position this cursor on the same leaf as the given cursor.

Parameters:
src - A cursor.
Returns:
The leaf on which the given cursor was positioned.
Throws:
IllegalArgumentException - if the argument is null
IllegalArgumentException - if the argument is a cursor for a different AbstractBTree.

clone

ILeafCursor<L> clone()
Clone the cursor.


prior

L prior()
Return the previous leaf in the natural order of the B+Tree. The cursor position is unchanged if there is no prececessor.

Returns:
The previous leaf -or- null iff there is no previous leaf.

next

L next()
Return the next leaf in the natural order of the B+Tree. The cursor position is unchanged if there is no successor.

Returns:
The next leaf -or- null iff there is no next leaf.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.