Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
Collections: Lists, Sets, and Maps
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Apr 6, 2013 8:01 PM by
Shouldn't LinkedHashSet have removeEldestEntry like LinkedHashMap
Apr 6, 2013 3:36 PM
Would it be useful if LinkedHashSet, like LinkedHashMap, had the option of overriding a removeEldestEntry method called every time elements are added to the collection.
I think this would be useful to function as a
-When full and new elements added, the eldest element is dicarded
-FIFO Queue or Deque
Can anybody recommend a collection in the framework that can serve this kind of purpose?
If not, does this sound like it would be a helpful addition?
This content has been marked as final.
Show 1 reply
Re: Shouldn't LinkedHashSet have removeEldestEntry like LinkedHashMap
Apr 6, 2013 8:01 PM
in response to
you can combine LinkedHashMap with Collections.newSetFromMap to get the same effect.