Truncate a LinkedList (original) (raw)
Weijun Wang weijun.wang at oracle.com
Tue Feb 19 10:27:33 UTC 2013
- Previous message: hg: jdk8/tl/langtools: 8008267: Add @Supported annotation to com.sun.source types
- Next message: Truncate a LinkedList
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi All
I'm using LinkedList to maintain a history and the elements are ordered by their timestamps. Every now and then I would "expunge" the list, that is to say, iterating through the list and when an element is old enough all elements after (and including) it will be removed. Currently I'm removing them one by one.
Is there a way to truncate the list using a single method?
Thanks Max
- Previous message: hg: jdk8/tl/langtools: 8008267: Add @Supported annotation to com.sun.source types
- Next message: Truncate a LinkedList
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]