Class AbstractCharSet
- java.lang.Object
-
- java.util.AbstractCollection<Character>
-
- org.codelibs.jhighlight.fastutil.chars.AbstractCharCollection
-
- org.codelibs.jhighlight.fastutil.chars.AbstractCharSet
-
- All Implemented Interfaces:
Cloneable
,Iterable<Character>
,Collection<Character>
,Set<Character>
,CharCollection
,CharIterable
,CharSet
public abstract class AbstractCharSet extends AbstractCharCollection implements Cloneable, CharSet
An abstract class providing basic methods for sets implementing a type-specific interface.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCharSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
Returns a hash code for this set.abstract CharIterator
iterator()
Returns a type-specific iterator on the elements of this collection.boolean
rem(char k)
Delegates toremove()
.boolean
remove(char k)
Removes an element from this set.boolean
remove(Object o)
Delegates to the corresponding type-specific method.-
Methods inherited from class org.codelibs.jhighlight.fastutil.chars.AbstractCharCollection
add, add, addAll, addAll, charIterator, contains, contains, containsAll, containsAll, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toCharArray, toCharArray, toString
-
Methods inherited from class java.util.AbstractCollection
clear, size
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.chars.CharCollection
add, addAll, charIterator, contains, containsAll, removeAll, retainAll, toArray, toArray, toCharArray, toCharArray
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Method Detail
-
iterator
public abstract CharIterator iterator()
Description copied from interface:CharCollection
Returns a type-specific iterator on the elements of this collection.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 extendsCollection
.- Specified by:
iterator
in interfaceCharCollection
- Specified by:
iterator
in interfaceCharIterable
- Specified by:
iterator
in interfaceCharSet
- Specified by:
iterator
in interfaceCollection<Character>
- Specified by:
iterator
in interfaceIterable<Character>
- Specified by:
iterator
in interfaceSet<Character>
- Specified by:
iterator
in classAbstractCharCollection
- Returns:
- a type-specific iterator on the elements of this collection.
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
Returns a hash code for this set. The hash code of a set is computed by summing the hash codes of its elements.
-
remove
public boolean remove(char k)
Description copied from interface:CharSet
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.- Specified by:
remove
in interfaceCharSet
- See Also:
Collection.remove(Object)
-
rem
public boolean rem(char k)
Delegates toremove()
.- Specified by:
rem
in interfaceCharCollection
- Overrides:
rem
in classAbstractCharCollection
- Parameters:
k
- the element to be removed.- Returns:
- true if the set was modified.
- See Also:
Collection.remove(Object)
-
remove
public boolean remove(Object o)
Delegates to the corresponding type-specific method.- Specified by:
remove
in interfaceCollection<Character>
- Specified by:
remove
in interfaceSet<Character>
- Overrides:
remove
in classAbstractCharCollection
-
-