What's new to the Collections Framework in Java 1.4?

John Zukowski

There are three new implementations:

  • LinkedHashSet
  • LinkedHashMap
  • IdentityHashMap
One marker interface:
  • RandomAccess
And six new utility methods for the Collections class:
  • rotate(List list, int distance)
  • replaceAll(List list, Object oldVal, Object newVal)
  • indexOfSubList(List source, List target)
  • lastIndexOfSubList(List source, List target)
  • swap(List list, int i, int j)
  • list(Enumeration e)