Class CacheSet<K>
java.lang.Object
org.aksw.commons.collections.CacheSet<K>
- Type Parameters:
K-
- All Implemented Interfaces:
Iterable<K>, Collection<K>, Set<K>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanPut operations are done for the current timebooleanbooleanaddAll(Collection<? extends K> arg0) addAndGetRemoved(K key) Adds an item, and returns an item that was removed - or null if no item was removedvoidclear()booleanbooleancontainsAll(Collection<?> arg0) booleangetKeyTime(K key) inthashCode()booleanisEmpty()iterator()FIXME Make sure that the iterator's remove method cannot be invoked directlybooleanbooleanremoveAll(Collection<?> items) booleanbooleanretainAll(Collection<?> arg0) setMaxItemCount(int newMaxItemCount) Sets a new maximum distance.intsize()Object[]toArray()<X> X[]toArray(X[] arg0) toString()Methods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
spliterator
-
Constructor Details
-
CacheSet
public CacheSet()inclusive: wheter max distance is inclusive or exclusive. e.g. if maxDistance is 10, and a distance is also 10, then inclusive: the item is retained (10 is included) exclusive: the item is removed -
CacheSet
public CacheSet(int maxItemCount, boolean allowRenewal)
-
-
Method Details
-
getKeyTime
-
setMaxItemCount
-
renew
-
addAndGetRemoved
-
add
-
_add
Put operations are done for the current time -
addAll
-
clear
-
contains
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>- Specified by:
containsAllin interfaceSet<K>
-
isEmpty
-
iterator
-
remove
-
removeAll
-
retainAll
-
size
-
toArray
-
toArray
-
hashCode
-
equals
-
toString
-