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.util
Class Atts

    java.lang.Object
      org.basex.util.Atts

    public final class Atts

extends java.lang.Object

This is a simple container for attributes (keys and values).

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

Field Summary
`byte[][]` | `key` Key array.
`int` | `size` Current array size.
`byte[][]` | `val` Value array.

Constructor Summary
`Atts()`

Method Summary
`Atts` | `add(byte[] k, byte[] v)` Adds next value.
`boolean` | `addUnique(byte[] k, byte[] v)` Adds the specified values if the key is new.
`void` | `delete(int i)` Deletes the specified entry.
`int` | `get(byte[] k)` Returns the reference for the specified key.
`Atts` | `reset()` Resets the integer list.
`Atts` | `set(byte[] k, byte[] v)` Sets the specified value.

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

Field Detail

### key

    public byte[][] key

  Key array.

### val

    public byte[][] val

  Value array.

### size

    public int size

  Current array size.

Constructor Detail

### Atts

    public Atts()

Method Detail

### set

    public Atts set(byte[] k,
                    byte[] v)

  Sets the specified value.

  Parameters:
    `k` - key to be added
    `v` - value to be added
  Returns:
    self reference

### add

    public Atts add(byte[] k,
                    byte[] v)

  Adds next value.

  Parameters:
    `k` - key to be added
    `v` - value to be added
  Returns:
    self reference

### delete

    public void delete(int i)

  Deletes the specified entry.

  Parameters:
    `i` - entry to be deleted

### addUnique

    public boolean addUnique(byte[] k,
                             byte[] v)

  Adds the specified values if the key is new.

  Parameters:
    `k` - key to be checked
    `v` - value to be added
  Returns:
    true if values were added

### get

    public int get(byte[] k)

  Returns the reference for the specified key.

  Parameters:
    `k` - key to be found
  Returns:
    reference or -1

### reset

    public Atts reset()

  Resets the integer list.

  Returns:
    self reference

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