com.bigdata.btree
Class IndexSegment.ImmutableLeafCursor

java.lang.Object
  extended by com.bigdata.btree.IndexSegment.ImmutableLeafCursor
All Implemented Interfaces:
ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>, Cloneable
Enclosing class:
IndexSegment

public class IndexSegment.ImmutableLeafCursor
extends Object
implements ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>

Cursor using the double-linked leaves for efficient scans.

Version:
$Id: IndexSegment.java 5897 2012-01-27 17:45:20Z thompsonbry $
Author:
Bryan Thompson

Constructor Summary
IndexSegment.ImmutableLeafCursor(byte[] key)
           
IndexSegment.ImmutableLeafCursor(SeekEnum where)
           
 
Method Summary
 IndexSegment.ImmutableLeafCursor clone()
          Clone the cursor.
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf first()
          Return the first leaf.
 IndexSegment getBTree()
          The backing B+Tree.
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf last()
          Return the last leaf.
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf leaf()
          The current leaf (always defined).
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf next()
          Return the next leaf in the natural order of the B+Tree.
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf prior()
          Return the previous leaf in the natural order of the B+Tree.
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf seek(byte[] key)
          Find the leaf that would span the key.
 IndexSegment.ImmutableNodeFactory.ImmutableLeaf seek(ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf> src)
          Position this cursor on the same leaf as the given cursor.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexSegment.ImmutableLeafCursor

public IndexSegment.ImmutableLeafCursor(SeekEnum where)

IndexSegment.ImmutableLeafCursor

public IndexSegment.ImmutableLeafCursor(byte[] key)
Method Detail

leaf

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf leaf()
Description copied from interface: ILeafCursor
The current leaf (always defined).

Specified by:
leaf in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>

getBTree

public IndexSegment getBTree()
Description copied from interface: ILeafCursor
The backing B+Tree.

Specified by:
getBTree in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>

clone

public IndexSegment.ImmutableLeafCursor clone()
Description copied from interface: ILeafCursor
Clone the cursor.

Specified by:
clone in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>
Overrides:
clone in class Object

seek

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf seek(byte[] key)
Description copied from interface: ILeafCursor
Find the leaf that would span the key.

Specified by:
seek in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>
Parameters:
key - The key
Returns:
The leaf which would span that key and never null.

seek

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf seek(ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf> src)
Description copied from interface: ILeafCursor
Position this cursor on the same leaf as the given cursor.

Specified by:
seek in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>
Parameters:
src - A cursor.
Returns:
The leaf on which the given cursor was positioned.

first

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf first()
Description copied from interface: ILeafCursor
Return the first leaf.

Specified by:
first in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>

last

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf last()
Description copied from interface: ILeafCursor
Return the last leaf.

Specified by:
last in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>

next

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf next()
Description copied from interface: ILeafCursor
Return the next leaf in the natural order of the B+Tree. The cursor position is unchanged if there is no successor.

Specified by:
next in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>
Returns:
The next leaf -or- null iff there is no next leaf.

prior

public IndexSegment.ImmutableNodeFactory.ImmutableLeaf prior()
Description copied from interface: ILeafCursor
Return the previous leaf in the natural order of the B+Tree. The cursor position is unchanged if there is no prececessor.

Specified by:
prior in interface ILeafCursor<IndexSegment.ImmutableNodeFactory.ImmutableLeaf>
Returns:
The previous leaf -or- null iff there is no previous leaf.


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