public class FrequentAlgorithmImpl<T> extends AbstractDataStructure<T,FrequentAlgorithmParameterDefinition> implements CounterBasedDataStructure<T>
DataStructure.Type
FINITE_ITERABLE_DATA_STRUCTURES, FINITE_ITERABLE_POINTER_DATA_STRUCTURES, FINITE_POINTER_DATA_STRUCTURES, INFIITE_DATA_STRUCTURES, ITERABLE_DATA_STRUCTURES, POINTER_DATA_STRUCTURES
Constructor and Description |
---|
FrequentAlgorithmImpl(java.util.Map<FrequentAlgorithmParameterDefinition,DSParameter<?>> params) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<T> |
add(T t)
add elements to a stream based data structure may lead to removal of
other elements in the data structure If possible, the implementing
algorithm will return a collection of elements.
|
protected java.util.Collection<T> |
clean() |
void |
clear() |
boolean |
contains(java.lang.Object o) |
int |
getCapacity() |
long |
getFrequencyOf(T e) |
protected java.util.Map<T,java.lang.Long> |
getMap() |
long |
getSize() |
DataStructure.Type |
getType() |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
java.lang.String |
toString() |
getParameters, getUsedMemoryInBytes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getParameters, getUsedMemoryInBytes
public FrequentAlgorithmImpl(java.util.Map<FrequentAlgorithmParameterDefinition,DSParameter<?>> params)
protected java.util.Map<T,java.lang.Long> getMap()
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public java.util.Collection<T> add(T t)
DataStructure
add
in interface DataStructure<T>
protected java.util.Collection<T> clean()
public void clear()
clear
in interface DataStructure<T>
public boolean contains(java.lang.Object o)
contains
in interface DataStructure<T>
public int getCapacity()
getCapacity
in interface DataStructure<T>
public long getFrequencyOf(T e)
getFrequencyOf
in interface DataStructure<T>
public long getSize()
getSize
in interface DataStructure<T>
public DataStructure.Type getType()
getType
in interface DataStructure<T>
public boolean isEmpty()
isEmpty
in interface DataStructure<T>
public java.lang.String toString()
toString
in class java.lang.Object