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 protectedAbstractCharSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()Returns a hash code for this set.abstract CharIteratoriterator()Returns a type-specific iterator on the elements of this collection.booleanrem(char k)Delegates toremove().booleanremove(char k)Removes an element from this set.booleanremove(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:CharCollectionReturns 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:
iteratorin interfaceCharCollection- Specified by:
iteratorin interfaceCharIterable- Specified by:
iteratorin interfaceCharSet- Specified by:
iteratorin interfaceCollection<Character>- Specified by:
iteratorin interfaceIterable<Character>- Specified by:
iteratorin interfaceSet<Character>- Specified by:
iteratorin 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:CharSetRemoves 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.- Specified by:
removein interfaceCharSet- See Also:
Collection.remove(Object)
-
rem
public boolean rem(char k)
Delegates toremove().- Specified by:
remin interfaceCharCollection- Overrides:
remin 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:
removein interfaceCollection<Character>- Specified by:
removein interfaceSet<Character>- Overrides:
removein classAbstractCharCollection
-
-