Package it.unimi.dsi.fastutil.chars
Interface CharSet
- All Superinterfaces:
it.unimi.dsi.fastutil.chars.CharCollection,it.unimi.dsi.fastutil.chars.CharIterable,Collection<Character>,Iterable<Character>,Set<Character>
- All Known Subinterfaces:
CharSortedSet
- All Known Implementing Classes:
AbstractCharSet,AbstractCharSortedSet,CharArraySet,CharAVLTreeSet,CharLinkedOpenCustomHashSet,CharLinkedOpenHashSet,CharOpenCustomHashSet,CharOpenHashSet,CharRBTreeSet,CharSets.EmptySet,CharSets.Singleton,CharSets.SynchronizedSet,CharSets.UnmodifiableSet,CharSortedSets.EmptySet,CharSortedSets.Singleton,CharSortedSets.SynchronizedSortedSet,CharSortedSets.UnmodifiableSortedSet
A type-specific
Set; provides some additional methods that use polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator().
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDeprecated.Please use the corresponding type-specific method instead.default booleanDeprecated.Please use the corresponding type-specific method instead.it.unimi.dsi.fastutil.chars.CharIteratoriterator()Returns a type-specific iterator on the elements of this set.static CharSetof()Returns an immutable empty set.static CharSetof(char e) Returns an immutable set with the element given.static CharSetof(char... a) Returns an immutable list with the elements given.static CharSetof(char e0, char e1) Returns an immutable set with the elements given.static CharSetof(char e0, char e1, char e2) Returns an immutable set with the elements given.default booleanrem(char k) Deprecated.Please useremove()instead.booleanremove(char k) Removes an element from this set.default booleanDeprecated.Please use the corresponding type-specific method instead.default it.unimi.dsi.fastutil.chars.CharSpliteratorReturns a type-specific spliterator on the elements of this set.Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection
add, addAll, contains, containsAll, intIterator, intParallelStream, intSpliterator, intStream, parallelStream, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toCharArray, toCharArrayMethods inherited from interface it.unimi.dsi.fastutil.chars.CharIterable
forEach, forEach, forEachMethods inherited from interface java.util.Collection
toArray
-
Method Details
-
iterator
it.unimi.dsi.fastutil.chars.CharIterator iterator()Returns a type-specific iterator on the elements of this set.- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.chars.CharCollection- Specified by:
iteratorin interfaceit.unimi.dsi.fastutil.chars.CharIterable- Specified by:
iteratorin interfaceCollection<Character>- Specified by:
iteratorin interfaceIterable<Character>- Specified by:
iteratorin interfaceSet<Character>- Returns:
- a type-specific iterator on the elements of this set.
-
spliterator
default it.unimi.dsi.fastutil.chars.CharSpliterator spliterator()Returns a type-specific spliterator on the elements of this set.Set spliterators must report at least
Spliterator.DISTINCT.See
Set.spliterator()for more documentation on the requirements of the returned spliterator.- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.chars.CharCollection- Specified by:
spliteratorin interfaceit.unimi.dsi.fastutil.chars.CharIterable- Specified by:
spliteratorin interfaceCollection<Character>- Specified by:
spliteratorin interfaceIterable<Character>- Specified by:
spliteratorin interfaceSet<Character>- Returns:
- Since:
- 8.5.0
-
remove
boolean remove(char k) Removes an element from this set.- See Also:
-
remove
Deprecated.Please use the corresponding type-specific method instead. -
add
Deprecated.Please use the corresponding type-specific method instead. -
contains
Deprecated.Please use the corresponding type-specific method instead. -
rem
Deprecated.Please useremove()instead.Removes an element from this set.This method is inherited from the type-specific collection this type-specific set is based on, but it should not used as this interface reinstates
remove()as removal method.- Specified by:
remin interfaceit.unimi.dsi.fastutil.chars.CharCollection
-
of
Returns an immutable empty set.- Returns:
- an immutable empty set.
-
of
Returns an immutable set with the element given.- Parameters:
e- an element.- Returns:
- an immutable set containing
e.
-
of
Returns an immutable set with the elements given.- Parameters:
e0- the first element.e1- the second element.- Returns:
- an immutable set containing
e0ande1. - Throws:
IllegalArgumentException- if there were duplicate entries.
-
of
Returns an immutable set with the elements given.- Parameters:
e0- the first element.e1- the second element.e2- the third element.- Returns:
- an immutable set containing
e0,e1, ande2. - Throws:
IllegalArgumentException- if there were duplicate entries.
-
of
Returns an immutable list with the elements given.- Parameters:
a- the list of elements that will be in the final set.- Returns:
- an immutable set containing the elements in
a. - Throws:
IllegalArgumentException- if there are any duplicate entries.
-