Package org.predict4all.nlp.utils
Class FifoSet<T>
- java.lang.Object
-
- org.predict4all.nlp.utils.FifoSet<T>
-
- Type Parameters:
T
- type of elements in the set
public class FifoSet<T> extends java.lang.Object
A set maintaining exactlymaxSize
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()
-