Package it.unimi.dsi.fastutil.chars
Interface CharSet
- All Superinterfaces:
CharCollection
,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
public interface CharSet extends CharCollection, Set<Character>
A type-specific
Set
; provides some additional methods that use
polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator()
.
- See Also:
Set
-
Method Summary
Modifier and Type Method Description default boolean
add(Character o)
Deprecated.Please use the corresponding type-specific method instead.default boolean
contains(Object o)
Deprecated.Please use the corresponding type-specific method instead.CharIterator
iterator()
Returns a type-specific iterator on the elements of this set.default boolean
rem(char k)
Deprecated.Please useremove()
instead.boolean
remove(char k)
Removes an element from this set.default boolean
remove(Object o)
Deprecated.Please use the corresponding type-specific method instead.Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toCharArray, toCharArray
-
Method Details
-
iterator
CharIterator iterator()Returns a type-specific iterator on the elements of this set.Note that this specification strengthens the one given in
Iterable.iterator()
, which was already strengthened in the corresponding type-specific class, but was weakened by the fact that this interface extendsSet
.- Specified by:
iterator
in interfaceCharCollection
- Specified by:
iterator
in interfaceCharIterable
- Specified by:
iterator
in interfaceCollection<Character>
- Specified by:
iterator
in interfaceIterable<Character>
- Specified by:
iterator
in interfaceSet<Character>
- Returns:
- a type-specific iterator on the elements of this set.
- See Also:
Iterable.iterator()
-
remove
boolean remove(char k)Removes an element from this set.Note that the corresponding method of a type-specific collection is
rem()
. This unfortunate situation is caused by the clash with the similarly named index-based method in theList
interface.- See Also:
Collection.remove(Object)
-
remove
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
remove
in interfaceCharCollection
- Specified by:
remove
in interfaceCollection<Character>
- Specified by:
remove
in interfaceSet<Character>
-
add
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
add
in interfaceCharCollection
- Specified by:
add
in interfaceCollection<Character>
- Specified by:
add
in interfaceSet<Character>
-
contains
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
contains
in interfaceCharCollection
- Specified by:
contains
in interfaceCollection<Character>
- Specified by:
contains
in interfaceSet<Character>
-
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:
rem
in interfaceCharCollection
- See Also:
Collection.remove(Object)
-