1 Reply Latest reply: Apr 6, 2013 8:01 PM by jtahlborn RSS

    Shouldn't LinkedHashSet have removeEldestEntry like LinkedHashMap


      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 BoundBufferQueue
      -Bound -Fixed size
      -Buffer -When full and new elements added, the eldest element is dicarded
      -Queue -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?