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 CharIteratoriterator()Returns a type-specific iterator on the elements of this set.booleanremove(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:
iteratorin interfaceCharCollection- Specified by:
iteratorin interfaceCharIterable- 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.
-
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 theListinterface.- See Also:
Collection.remove(Object)
-
-