## xbase
Class NTXIndex

    java.lang.Object
      |
      +--xbase.XbaseIndex
            |
            +--xbase.NTXIndex

public class NTXIndex
extends XbaseIndex

Xbase index file for Clipper .NTX files

Fields inherited from class xbase.XbaseIndex
`debug, EQ, GE, LE`

Constructor Summary
`NTXIndex(XbaseFile xfile, NTXFile file, XbaseKey keyDescription, int keyNo)`

Method Summary
`protected int` `bottom()` Position to the last/bottom record of the index.
`double` `getPosition()` Get the current estimated position in the index.
`int` `getRecordNumber()` Get the current record number.
`protected int` `next()` Position to the next record of the index.
`protected int` `previous()` Position to the previous record of the index.
`int` `seek(double seekValue, int mode)` Position to the given estimated position in the index.
`int` `seek(java.lang.String value, int mode)` Position to the given index key.
`protected int` `top()` Position to the first/top record of the index.

Methods inherited from class xbase.XbaseIndex
`first, getFile, getIndexKeyNo, last, next, previous, read, read, setDebug`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NTXIndex

    public NTXIndex(XbaseFile xfile,
                    NTXFile file,
                    XbaseKey keyDescription,
                    int keyNo)
             throws java.io.IOException

Method Detail

### getRecordNumber

    public int getRecordNumber()

  Get the current record number. From interface RecordOrder.
  Overrides:
    getRecordNumber in class XbaseIndex
  Returns:
    The current record number from zero.

### top

    protected int top()
               throws java.io.IOException

  Position to the first/top record of the index. From interface XbaseIndex.
  Overrides:
    top in class XbaseIndex
  Tags copied from class: XbaseIndex
  Returns:
    The record number.

### bottom

    protected int bottom()
                  throws java.io.IOException

  Position to the last/bottom record of the index. From interface RecordOrder.
  Overrides:
    bottom in class XbaseIndex
  Tags copied from class: XbaseIndex
  Returns:
    The record number.

### next

    protected int next()
                throws java.io.IOException

  Position to the next record of the index. From interface RecordOrder.
  Overrides:
    next in class XbaseIndex
  Tags copied from class: XbaseIndex
  Returns:
    The record number, -1 if no valid record.

### previous

    protected int previous()
                    throws java.io.IOException

  Position to the previous record of the index. From interface RecordOrder.
  Overrides:
    previous in class XbaseIndex
  Tags copied from class: XbaseIndex
  Returns:
    The record number, -1 if no valid record.

### seek

    public int seek(java.lang.String value,
                    int mode)
             throws java.io.IOException

  Position to the given index key.
  Overrides:
    seek in class XbaseIndex
  Parameters:
    `value` - The key value to search for.
    `mode` - One of XbaseIndex.EQ to find the extact key, XbaseIndex.LE to find extact or previous, XbaseIndex.GE to find extact or next.
  Returns:
    true if found.

### seek

    public int seek(double seekValue,
                    int mode)
             throws java.io.IOException

  Position to the given estimated position in the index. The key value is a fraction of the coverage of the index. A value of 0.5 should find about the middle record of the file. This is used to implement a scrolling list of records where absolutely exact positioning isn't necessary.
  Parameters:
    `seekValue` - The fraction of the index to seek to. This must be inclusive between 0 and 1.
    `mode` - How to handle key matches. One of NTXIndex.EQ to find the extact key, NTXIndex.LE to find extact or previous, NTXIndex.GE to find extact or next.
  Returns:
    true if found.

### getPosition

    public double getPosition()

  Get the current estimated position in the index.
  Returns:
    Estimated position between 0.0 and 1.0.