com.partnersoft.data
Class HistorySet

java.lang.Object
  extended by com.partnersoft.data.HistorySet

public class HistorySet
extends java.lang.Object

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.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

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

HistorySet

public HistorySet()
Method Detail

add

public void add(java.lang.Object item)

getOrdering

public java.util.ArrayList getOrdering()