public interface CharSet extends CharCollection, Set<Character>
Set; provides some additional methods that use
polymorphism to avoid (un)boxing.
Additionally, this interface strengthens (again) iterator().
Set| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Character key)
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
contains(Object key)
Deprecated.
Please use the corresponding type-specific method instead.
|
CharIterator |
iterator()
Returns a type-specific iterator on the elements of this set.
|
boolean |
rem(char k)
Deprecated.
please use
remove() instead. |
boolean |
remove(char k)
Removes an element from this set.
|
boolean |
remove(Object key)
Deprecated.
Please use (and implement) the
rem() method instead. |
add, addAll, charIterator, contains, containsAll, removeAll, retainAll, toArray, toCharArray, toCharArrayaddAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streamCharIterator 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 Collection<Character>iterator in interface Iterable<Character>iterator in interface Set<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 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)@Deprecated boolean add(Character key)
This method specification is a workaround for bug 8177440.
add in interface CharCollectionadd in interface Collection<Character>add in interface Set<Character>@Deprecated boolean contains(Object key)
This method specification is a workaround for bug 8177440.
contains in interface CharCollectioncontains in interface Collection<Character>contains in interface Set<Character>@Deprecated boolean remove(Object key)
rem() method instead.This method specification is a workaround for bug 8177440.
remove in interface CharCollectionremove in interface Collection<Character>remove in interface Set<Character>