Class FifoSet<T>

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

    public class FifoSet<T>
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      FifoSet​(int maxSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(T element)  
      void clear()  
      boolean contains​(T element)  
      java.util.Map<T,​java.util.concurrent.atomic.LongAdder> getCountMap()  
      java.util.Set<T> getSet()  
      int size()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FifoSet

        public FifoSet​(int maxSize)
    • Method Detail

      • add

        public void add​(T element)
      • getSet

        public java.util.Set<T> getSet()
      • size

        public int size()
      • contains

        public boolean contains​(T element)
      • clear

        public void clear()
      • getCountMap

        public java.util.Map<T,​java.util.concurrent.atomic.LongAdder> getCountMap()