Decorates another
Set
to ensure that the order of addition is retained and used by the iterator.
If an object is added to the set for a second time, it will remain in the original position in the iteration. The order can be observed from the set via the iterator or toArray methods.
The ListOrderedSet also has various useful direct methods. These include many from List
, such as get(int)
, remove(int)
and indexOf(int)
. An unmodifiable List
view of the set can be obtained via asList()
.
This class cannot implement the List
interface directly as various interface methods (notably equals/hashCode) are incompatable with a set.
This class is Serializable from Commons Collections 3.1.
@since Commons Collections 3.0
@version $Revision: 1.9 $ $Date: 2004/06/07 21:42:12 $
@author Stephen Colebourne
@author Henning P. Schmiedehausen