|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.BOB.NamedDB
public class NamedDB
Internal database to relate nicknames to options to values
Constructor Summary | |
---|---|
NamedDB()
make initial NULL object |
Method Summary | |
---|---|
void |
add(java.lang.Object key,
java.lang.Object val)
Add object to the array, deletes the old one if it exists |
boolean |
exists(java.lang.Object key)
returns true if an object exists, else returns false |
java.lang.Object |
get(java.lang.Object key)
Get the object, and return it, throws RuntimeException |
int |
getcount()
|
java.lang.Object |
getnext(int i)
|
void |
getReadLock()
|
void |
getWriteLock()
|
int |
idx(java.lang.Object key)
Find objects in the array, returns it's index or throws exception |
void |
kill(java.lang.Object key)
Delete an object from array if it exists |
void |
releaseReadLock()
|
void |
releaseWriteLock()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamedDB()
Method Detail |
---|
public void getReadLock()
public void releaseReadLock()
public void getWriteLock()
public void releaseWriteLock()
public int idx(java.lang.Object key) throws java.lang.ArrayIndexOutOfBoundsException
key
-
java.lang.ArrayIndexOutOfBoundsException
- when key does not existpublic void kill(java.lang.Object key)
key
- public void add(java.lang.Object key, java.lang.Object val)
key
- val
- public java.lang.Object get(java.lang.Object key) throws java.lang.RuntimeException
key
-
java.lang.RuntimeException
public boolean exists(java.lang.Object key)
key
-
public java.lang.Object getnext(int i) throws java.lang.RuntimeException
i
- index
java.lang.RuntimeException
public int getcount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |