Class UniversalExternalSet<T>
- java.lang.Object
-
- it.unive.lisa.util.collections.externalSet.UniversalExternalSet<T>
-
- Type Parameters:
T- the type of elements inside this set
- All Implemented Interfaces:
ExternalSet<T>,java.lang.Iterable<T>,java.util.Collection<T>,java.util.Set<T>
public class UniversalExternalSet<T> extends java.lang.Object implements ExternalSet<T>
AnExternalSetthat always stays up-to-date with the contents of the underlying factory, but that cannot be modified.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T e)booleanaddAll(java.util.Collection<? extends T> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)ExternalSet<T>copy()Copying anUniversalExternalSetyields aBitExternalSetrepresenting a snapshot of the actual state of the cache.
Yields a fresh copy of this set, defined over the same cache and containing the same elements.booleanequals(java.lang.Object obj)ExternalSetCache<T>getCache()Yields the cache that this set is connected to.inthashCode()booleanisEmpty()java.util.Iterator<T>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()java.lang.Object[]toArray()<E> E[]toArray(E[] a)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.util.collections.externalSet.ExternalSet
addAll, allMatch, anyMatch, collect, contains, difference, filter, first, intersection, intersects, multiTransform, noneMatch, reduce, transform, union
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
iterator
public java.util.Iterator<T> iterator()
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <E> E[] toArray(E[] a)
-
add
public boolean add(T e)
-
remove
public boolean remove(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends T> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
clear
public void clear()
-
getCache
public ExternalSetCache<T> getCache()
Description copied from interface:ExternalSetYields the cache that this set is connected to.- Specified by:
getCachein interfaceExternalSet<T>- Returns:
- the cache
-
copy
public ExternalSet<T> copy()
Copying anUniversalExternalSetyields aBitExternalSetrepresenting a snapshot of the actual state of the cache.
Yields a fresh copy of this set, defined over the same cache and containing the same elements.- Specified by:
copyin interfaceExternalSet<T>- Returns:
- the fresh copy
-
hashCode
public int hashCode()
-
-