|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.data.HistorySet
public class HistorySet
This data structure maintains a set of unique objects, sorted by how long ago they were added to the set. Adding the same (or equivalent) object multiple times updates the order but doesn't add multiple copies. This is handy for maintaining history lists or recently-used lists, where you want to keep track of items actively in use but don't want to duplicate the item for each occurence. Note that this ordering is probably the opposite of what you want for a GUI, use a com.partnersoft.gui.ArrayListListModel witg reverse set to true to compensate.
| Constructor Summary | |
|---|---|
HistorySet()
|
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object item)
|
java.util.ArrayList |
getOrdering()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HistorySet()
| Method Detail |
|---|
public void add(java.lang.Object item)
public java.util.ArrayList getOrdering()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||