ArrayList, for an implementation of the
LinkedHashMap, for an implementation of the
LinkedHashSet, for an implementation of the
ArrayDeque, for an implementation of both the the
Before JDK 1.5,
were the preferred implementations of
Set. However, the iterators returned by those classes have
the somewhat bizarre property of having an undefined order. That is, iterating over
can return elements in a different order at different times. Their iteration order is not guaranteed to be
repeatable (and often isn't).
slightly better overall performance, for most business applications it is likely best to avoid such
To retain the sorting of items being manipulated in a graphical user
are useful. They force a collection to maintain a sort order when the user
adds and deletes items.