Package org.infinispan.util
Class ReadOnlyCollectionAsSet<T>
- java.lang.Object
-
- org.infinispan.util.ReadOnlyCollectionAsSet<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Set<T>
public class ReadOnlyCollectionAsSet<T> extends Object implements Set<T>
Assumes that the delegate collection already contains unique elements.
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyCollectionAsSet(Collection<? extends T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()Iterator<T>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T1> T1[]toArray(T1[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
-
-
-
Constructor Detail
-
ReadOnlyCollectionAsSet
public ReadOnlyCollectionAsSet(Collection<? extends T> delegate)
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T1> T1[] toArray(T1[] a)
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceSet<T>
-
addAll
public boolean addAll(Collection<? extends T> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
-