Interface CharSet
-
- All Superinterfaces:
CharCollection
,CharIterable
,Collection<Character>
,Iterable<Character>
,Set<Character>
- All Known Implementing Classes:
AbstractCharSet
public interface CharSet extends CharCollection, Set<Character>
A type-specificSet
; provides some additional methods that use polymorphism to avoid (un)boxing.Additionally, this interface strengthens (again)
iterator()
.- See Also:
Set
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CharIterator
iterator()
Returns a type-specific iterator on the elements of this set.boolean
remove(char k)
Removes an element from this set.-
Methods inherited from interface org.codelibs.jhighlight.fastutil.chars.CharCollection
add, addAll, charIterator, contains, containsAll, rem, removeAll, retainAll, toArray, toArray, toCharArray, toCharArray
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
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.
-
remove
boolean remove(char k)
Removes an element from this set.Note that the corresponding method of the 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)
-
-