Package it.unimi.dsi.fastutil.objects
Class ReferenceSets.UnmodifiableSet<K>
java.lang.Object
it.unimi.dsi.fastutil.objects.ReferenceSets.UnmodifiableSet<K>
- All Implemented Interfaces:
ObjectIterable<K>
,ReferenceCollection<K>
,ReferenceSet<K>
,Serializable
,Iterable<K>
,Collection<K>
,Set<K>
- Direct Known Subclasses:
ReferenceSortedSets.UnmodifiableSortedSet
- Enclosing class:
ReferenceSets
public static class ReferenceSets.UnmodifiableSet<K>
extends Object
implements ReferenceSet<K>, Serializable
An unmodifiable wrapper class for sets.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends K> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
void
int
hashCode()
boolean
isEmpty()
iterator()
Returns a type-specific iterator on the elements of this collection.boolean
boolean
removeAll
(Collection<?> c) boolean
boolean
retainAll
(Collection<?> c) int
size()
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, toArray
Methods inherited from interface it.unimi.dsi.fastutil.objects.ReferenceSet
iterator, spliterator
-
Method Details
-
remove
-
equals
-
hashCode
public int hashCode() -
add
- Specified by:
add
in interfaceCollection<K>
-
size
public int size()- Specified by:
size
in interfaceCollection<K>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<K>
-
contains
- Specified by:
contains
in interfaceCollection<K>
-
iterator
Description copied from interface:ReferenceCollection
Returns a type-specific iterator on the elements of this collection.- Specified by:
iterator
in interfaceCollection<K>
- Specified by:
iterator
in interfaceIterable<K>
- Specified by:
iterator
in interfaceObjectIterable<K>
- Specified by:
iterator
in interfaceReferenceCollection<K>
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
spliterator
Description copied from interface:ReferenceCollection
Returns 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:
spliterator
in interfaceCollection<K>
- Specified by:
spliterator
in interfaceIterable<K>
- Specified by:
spliterator
in interfaceObjectIterable<K>
- Specified by:
spliterator
in interfaceReferenceCollection<K>
- Returns:
- a type-specific spliterator on the elements of this collection.
-
stream
- Specified by:
stream
in interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStream
in interfaceCollection<K>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<K>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<K>
-
toArray
- Specified by:
toArray
in interfaceCollection<K>
-
forEach
-
containsAll
- Specified by:
containsAll
in interfaceCollection<K>
-
addAll
- Specified by:
addAll
in interfaceCollection<K>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<K>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<K>
-
removeIf
- Specified by:
removeIf
in interfaceCollection<K>
-
toString
-