Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.index
Class MemValues

    java.lang.Object
      org.basex.util.TokenSet
          org.basex.index.MemValues

All Implemented Interfaces:
  Index

    public final class MemValues

extends TokenSet
implements Index

This class provides a main-memory access to attribute values and text contents.

Author:
  Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Constructor Summary
`MemValues()`

Method Summary
`void` | `close()` Closes the index.
`byte[]` | `get(int id)` Returns the key for the specified id.
`IndexIterator` | `ids(IndexToken tok)` Returns an iterator for the index results.
`int` | `index(byte[] key, int id)` Indexes the specified keys and values.
`byte[]` | `info()` Returns information on the index structure.
`int` | `nrIDs(IndexToken it)` Returns the (approximate/estimated) number of ids for the specified token.
`void` | `rehash()` Resizes the hash table.

Methods inherited from class org.basex.util.TokenSet
`add, delete, id, key, keys, read, size, write`

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

Constructor Detail

### MemValues

    public MemValues()

Method Detail

### index

    public int index(byte[] key,
                     int id)

  Indexes the specified keys and values.

  Parameters:
    `key` - key
    `id` - id value
  Returns:
    index position

### get

    public byte[] get(int id)

  Returns the key for the specified id.

  Parameters:
    `id` - id
  Returns:
    token

### ids

    public IndexIterator ids(IndexToken tok)

  Description copied from interface: `Index`
  Returns an iterator for the index results.

  Specified by:
    `ids` in interface `Index`
  Parameters:
    `tok` - token to be found
  Returns:
    ids

### nrIDs

    public int nrIDs(IndexToken it)

  Description copied from interface: `Index`
  Returns the (approximate/estimated) number of ids for the specified token.

  Specified by:
    `nrIDs` in interface `Index`
  Parameters:
    `it` - token to be found
  Returns:
    number of ids

### info

    public byte[] info()

  Description copied from interface: `Index`
  Returns information on the index structure.

  Specified by:
    `info` in interface `Index`
  Returns:
    info

### close

    public void close()

  Description copied from interface: `Index`
  Closes the index.

  Specified by:
    `close` in interface `Index`

### rehash

    public void rehash()

  Description copied from class: `TokenSet`
  Resizes the hash table.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD