Class FifoSet<T>

  • Type Parameters:
    T - type of elements in the set

    public class FifoSet<T>
    extends Object
    A set maintaining exactly maxSize or less but keeping there insertion order to always delete the first inserted element when set is full.
    • Constructor Detail

      • FifoSet

        public FifoSet​(int maxSize)
    • Method Detail

      • add

        public void add​(T element)
      • getSet

        public Set<T> getSet()
      • size

        public int size()
      • contains

        public boolean contains​(T element)
      • clear

        public void clear()