JDK-8012032 : LinkedHashSet has no accessors for first and last items
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-03-20
  • Updated: 2016-11-29
  • Resolved: 2016-11-29
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
No way to access/modify first and last items in the linked list.

JUSTIFICATION :
You can at most create a subclass to indicate if you want objects at the end removed. This is supposed to be for a LRU cache implementation, but there is no way to access the entry being evicted in this way.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
This is supposed to be both a HashMap and a linked list, but nothing from the linked list is present. Access methods like LinkedList: getLast(), removeLast(), etc. should be there.
ACTUAL -
Missing.