|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--graph.distinctFIFO
General utility class: has nothing to do with graphs. FIFO data structure. Adding nulls is ignored. Adding an object that was previously added has no effect. That is, the stream of non-null objects returned by calls to get are all distinct. Example: add(a); add(b); add(null); add(b); add(c); add(a); get()->a; get()->b; get()->c; get()->null;
Inner Class Summary | |
static class |
distinctFIFO.Test
|
Constructor Summary | |
distinctFIFO()
|
Method Summary | |
void |
put(java.lang.Object obj)
|
java.lang.Object |
remove()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public distinctFIFO()
Method Detail |
public void put(java.lang.Object obj)
public java.lang.Object remove()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |