org.basex.util
Class Atts

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

public final class Atts
extends Object

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

Author:
Workgroup DBIS, University of Konstanz 2005-10, 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 contains(byte[] k)
          Checks if the specified key is found.
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, 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

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

contains

public boolean contains(byte[] k)
Checks if the specified key is found.

Parameters:
k - key to be checked
Returns:
result of check

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

toString

public String toString()
Overrides:
toString in class Object