CharCollection, CharIterable, java.util.Collection<java.lang.Character>, java.lang.Iterable<java.lang.Character>, java.util.Set<java.lang.Character>CharSortedSetAbstractCharSet, AbstractCharSortedSet, CharArraySet, CharAVLTreeSet, CharLinkedOpenCustomHashSet, CharLinkedOpenHashSet, CharOpenCustomHashSet, CharOpenHashSet, CharRBTreeSet, CharSets.EmptySet, CharSets.Singleton, CharSets.SynchronizedSet, CharSets.UnmodifiableSet, CharSortedSets.EmptySet, CharSortedSets.Singleton, CharSortedSets.SynchronizedSortedSet, CharSortedSets.UnmodifiableSortedSetpublic interface CharSet extends CharCollection, java.util.Set<java.lang.Character>
Set; provides some additional methods that use
polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator().
Set| Modifier and Type | Method | Description |
|---|---|---|
default boolean |
add(java.lang.Character o) |
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
contains(java.lang.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 use
remove() instead. |
boolean |
remove(char k) |
Removes an element from this set.
|
default boolean |
remove(java.lang.Object o) |
Deprecated.
Please use the corresponding type-specific method instead.
|
add, addAll, contains, containsAll, removeAll, removeIf, removeIf, retainAll, toArray, toCharArray, toCharArrayforEach, forEachCharIterator iterator()
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 extends Set.
iterator in interface CharCollectioniterator in interface CharIterableiterator in interface java.util.Collection<java.lang.Character>iterator in interface java.lang.Iterable<java.lang.Character>iterator in interface java.util.Set<java.lang.Character>Iterable.iterator()boolean remove(char k)
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 the List interface.
Collection.remove(Object)@Deprecated default boolean remove(java.lang.Object o)
remove in interface CharCollectionremove in interface java.util.Collection<java.lang.Character>remove in interface java.util.Set<java.lang.Character>@Deprecated default boolean add(java.lang.Character o)
add in interface CharCollectionadd in interface java.util.Collection<java.lang.Character>add in interface java.util.Set<java.lang.Character>@Deprecated default boolean contains(java.lang.Object o)
contains in interface CharCollectioncontains in interface java.util.Collection<java.lang.Character>contains in interface java.util.Set<java.lang.Character>@Deprecated default boolean rem(char k)
remove() instead.
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.
rem in interface CharCollectionCollection.remove(Object)