net.i2p.BOB
public class NamedDB extends Object
Constructor and Description |
---|
NamedDB()
make initial NULL object
|
Modifier and Type | Method and Description |
---|---|
void |
add(Object key,
Object val)
Add object to the array, deletes the old one if it exists
|
boolean |
exists(Object key)
returns true if an object exists, else returns false
|
Object |
get(Object key)
Get the object, and return it, throws RuntimeException
|
int |
getcount() |
Object |
getnext(int i) |
void |
getReadLock() |
void |
getWriteLock() |
int |
idx(Object key)
Find objects in the array, returns it's index or throws exception
|
void |
kill(Object key)
Delete an object from array if it exists
|
void |
releaseReadLock() |
void |
releaseWriteLock() |
public void getReadLock()
public void releaseReadLock()
public void getWriteLock()
public void releaseWriteLock()
public int idx(Object key) throws ArrayIndexOutOfBoundsException
key
- ArrayIndexOutOfBoundsException
- when key does not existpublic void kill(Object key)
key
- public void add(Object key, Object val)
key
- val
- public Object get(Object key) throws RuntimeException
key
- RuntimeException
public boolean exists(Object key)
key
- public Object getnext(int i) throws RuntimeException
i
- indexRuntimeException
public int getcount()