jdbm.helper

## Class TupleBrowser<K,V>

- java.lang.Object
- - jdbm.helper.TupleBrowser<K,V>

    public abstract class TupleBrowser<K,V>
    extends Object

Browser to traverse a collection of tuples. The browser allows for forward and reverse order traversal.

Author:
  Alex Boisvert

### Constructor Summary

Constructors
Constructor and Description
`TupleBrowser()`

### Method Summary

Methods
`void` `close()` Closes the browser and deallocates any resources it might have allocated.
`abstract boolean` `getNext(Tuple<K,V> tuple)` Get the next tuple.
`abstract boolean` `getPrevious(Tuple<K,V> tuple)` Get the previous tuple.

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

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

### Constructor Detail

#### TupleBrowser

    public TupleBrowser()

### Method Detail

#### getNext

    public abstract boolean getNext(Tuple<K,V> tuple)
                             throws IOException

Get the next tuple.

Parameters:
  `tuple` - Tuple into which values are copied.
Returns:
  True if values have been copied in tuple, or false if there is no next tuple.
Throws:
  `IOException`

#### getPrevious

    public abstract boolean getPrevious(Tuple<K,V> tuple)
                                 throws IOException

Get the previous tuple.

Parameters:
  `tuple` - Tuple into which values are copied.
Returns:
  True if values have been copied in tuple, or false if there is no previous tuple.
Throws:
  `IOException`

#### close

    public void close()

Closes the browser and deallocates any resources it might have allocated. Repeated calls of close are OK.