-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
1.4.1
-
Fix Understood
eldes
Name: rmT116609 Date: 04/15/2003
A DESCRIPTION OF THE REQUEST :
In working with the LinkedHashMap class a bit recently, I think I've found a few additional convenience methods that could prove useful. The following is a list:
1. A method to get the first node in the list. After a quick glance at the code, this seems like it would simply involve accessing the 'header' entry.
2. A method to get the last, or eldest entry in the list. If I'm not mistaken, this seems like it would be the 'header.before' entry.
3. A method to support reverse iteration. Since it is a doubly-linked list, once again, easy modification.
4. A method, given a key, to start iteration at that key's point in the list.
JUSTIFICATION :
1. Once again, if I'm correct, the only way to get the last (eldest) entry is to traverse the whole list via the iterator.
2. Reverse iteration would be even more complex.
3. Starting iteration given a particular key would involve a sequential search in traversing the list.
(Review ID: 184177)
======================================================================
Name: rmT116609 Date: 04/15/2003
A DESCRIPTION OF THE REQUEST :
In working with the LinkedHashMap class a bit recently, I think I've found a few additional convenience methods that could prove useful. The following is a list:
1. A method to get the first node in the list. After a quick glance at the code, this seems like it would simply involve accessing the 'header' entry.
2. A method to get the last, or eldest entry in the list. If I'm not mistaken, this seems like it would be the 'header.before' entry.
3. A method to support reverse iteration. Since it is a doubly-linked list, once again, easy modification.
4. A method, given a key, to start iteration at that key's point in the list.
JUSTIFICATION :
1. Once again, if I'm correct, the only way to get the last (eldest) entry is to traverse the whole list via the iterator.
2. Reverse iteration would be even more complex.
3. Starting iteration given a particular key would involve a sequential search in traversing the list.
(Review ID: 184177)
======================================================================
- duplicates
-
JDK-8012032 LinkedHashSet has no accessors for first and last items
-
- Closed
-
-
JDK-8170438 Reverse Iteration of LinkedHashSet
-
- Closed
-