Class TemporaryList<T>


  • public class TemporaryList<T>
    extends Object
    The TemporaryList implements a list whose items are automatically removed after a predefined timeout. When an item is removed by timeout, listener can be called to handle the remove operation.
    Author:
    Frank Fock
    • Constructor Detail

      • TemporaryList

        public TemporaryList()
      • TemporaryList

        public TemporaryList​(int timeout)
        Creates a temporary list with the given timeout in milliseconds.
        Parameters:
        timeout - the milliseconds to wait before an entry may get removed from this list.
    • Method Detail

      • add

        public void add​(T o)
      • contains

        public boolean contains​(T o)
      • remove

        public boolean remove​(T o)
      • setTimeout

        public void setTimeout​(int timeout)
      • getTimeout

        public int getTimeout()
      • size

        public int size()
      • clear

        public void clear()