JDK-6310255 : (coll) LinkedHashSet should implement List.
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-08-12
  • Updated: 2016-11-29
  • Resolved: 2005-08-12
Related Reports
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
Since the javadoc says that a doubly linked list is used internally, presumably LinkedHashSet could readily support all of the required and optional methods of List.

JUSTIFICATION :
It's sad that no JRE collection implements both List and Set.  Ie, a List without duplicates.

Comments
EVALUATION A list implementation must be equal (according to the equals method) to any other list containing the same elements in the same order. A set implementation must be equal to any set containing the same elements. Finally, the equality relation must be symmetric (a.equals(b) if and only if b.equals(a)). Probably none of that sounds too surprising. One consequence of it, though, is that a class cannot properly be both a list and a set.
12-08-2005