Oracle Community Directory
Oracle Community FAQ
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
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 7, 2013 1:01 AM by
Shouldn't LinkedHashSet have removeEldestEntry like LinkedHashMap
Apr 6, 2013 8: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 7, 2013 1:01 AM
in response to
you can combine LinkedHashMap with Collections.newSetFromMap to get the same effect.