Package it.unimi.dsi.fastutil.objects
Class ReferenceSets.SynchronizedSet<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ReferenceSets.SynchronizedSet<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.objects.ObjectIterable<K>,it.unimi.dsi.fastutil.objects.ReferenceCollection<K>,ReferenceSet<K>,Serializable,Iterable<K>,Collection<K>,Set<K>
- Direct Known Subclasses:
ReferenceSortedSets.SynchronizedSortedSet
- Enclosing class:
ReferenceSets
public static class ReferenceSets.SynchronizedSet<K>
extends Object
implements ReferenceSet<K>, Serializable
A synchronized wrapper class for sets.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedSynchronizedSet(ReferenceSet<K> s, Object sync) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends K> arg0) voidclear()booleanbooleancontainsAll(Collection<?> arg0) booleanvoidinthashCode()booleanisEmpty()it.unimi.dsi.fastutil.objects.ObjectIterator<K> iterator()booleanbooleanremoveAll(Collection<?> arg0) booleanbooleanretainAll(Collection<?> arg0) intsize()it.unimi.dsi.fastutil.objects.ObjectSpliterator<K> stream()Object[]toArray()<T> T[]toArray(T[] arg0) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceSet
iterator, spliterator
-
Field Details
-
collection
-
sync
-
-
Constructor Details
-
SynchronizedSet
-
SynchronizedSet
-
-
Method Details
-
remove
-
add
- Specified by:
addin interfaceCollection<K>
-
contains
- Specified by:
containsin interfaceCollection<K>
-
size
public int size()- Specified by:
sizein interfaceCollection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K>
-
toArray
- Specified by:
toArrayin interfaceCollection<K>
-
toArray
public <T> T[] toArray(T[] arg0) - Specified by:
toArrayin interfaceCollection<K>
-
iterator
- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.objects.ReferenceCollection<K>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ObjectIterable<K>- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.objects.ReferenceCollection<K>
-
stream
- Specified by:
streamin interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<K>
-
forEach
-
addAll
- Specified by:
addAllin interfaceCollection<K>
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K>
-
removeIf
- Specified by:
removeIfin interfaceCollection<K>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K>
-
toString
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<K>- Overrides:
hashCodein classObject
-
equals
- Specified by:
equalsin interfaceCollection<K>- Overrides:
equalsin classObject
-