|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The RandomAccess interface defines the common methods of the Table and Dictionary interfaces. A client can
A client can also
Methods for adding entries are defined in the Table and Dictionary intefaces.
Method Summary | |
void |
clear()
ra.clear() removes all entries from ra. |
java.lang.Object |
dataFor(java.lang.Object k)
ra.dataFor(k) returns the data for key k in ra. |
boolean |
isKey(java.lang.Object k)
ra.isKey(k) returns true if there is an entry with key k in ra. |
java.util.Iterator |
iterator()
ra.iterator() returns an iterator for all of the entries in ra. |
java.util.Iterator |
iterator(java.lang.Object kLo)
ra.iterator(Object kLo) returns an iterator for the entries in ra whose key is at least kLo. |
java.util.Iterator |
iterator(java.lang.Object kLo,
java.lang.Object kHi)
ra.iterator(Object kLo, Object kHi) returns an iterator for the entries in ra whose key is at least kLo and less than kHi. |
void |
remove(java.lang.Object k)
ra.remove(k) removes the entry for key k from ra. |
int |
size()
ra.size() returns the number of entries in ra. |
Method Detail |
public boolean isKey(java.lang.Object k)
public java.lang.Object dataFor(java.lang.Object k)
Precondition: ra.isKey(k) is true.
public void remove(java.lang.Object k)
Precondition: ra.isKey(k) is true.
public int size()
public void clear()
public java.util.Iterator iterator()
public java.util.Iterator iterator(java.lang.Object kLo)
public java.util.Iterator iterator(java.lang.Object kLo, java.lang.Object kHi)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |