Package it.unimi.dsi.fastutil.objects
Class ObjectSets.SynchronizedSet<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ObjectSets.SynchronizedSet<K>
- All Implemented Interfaces:
ObjectCollection<K>,ObjectIterable<K>,ObjectSet<K>,Serializable,Iterable<K>,Collection<K>,Set<K>
- Direct Known Subclasses:
ObjectSortedSets.SynchronizedSortedSet
- Enclosing class:
ObjectSets
public static class ObjectSets.SynchronizedSet<K>
extends Object
implements ObjectSet<K>, Serializable
A synchronized wrapper class for sets.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends K> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanvoidinthashCode()booleanisEmpty()iterator()Returns a type-specific iterator on the elements of this collection.booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()Returns a type-specific spliterator on the elements of this collection.stream()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface it.unimi.dsi.fastutil.objects.ObjectSet
iterator, spliterator
-
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[] a) - Specified by:
toArrayin interfaceCollection<K>
-
iterator
Description copied from interface:ObjectCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin interfaceObjectCollection<K>- Specified by:
iteratorin interfaceObjectIterable<K>- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
spliterator
Description copied from interface:ObjectCollectionReturns a type-specific spliterator on the elements of this collection.See
Collection.spliterator()for more documentation on the requirements of the returned spliterator.- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceObjectCollection<K>- Specified by:
spliteratorin interfaceObjectIterable<K>- Returns:
- a type-specific spliterator on the elements of this collection.
-
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
-