Class CharIterators.EmptyIterator
- java.lang.Object
-
- org.codelibs.jhighlight.fastutil.chars.AbstractCharIterator
-
- org.codelibs.jhighlight.fastutil.chars.AbstractCharBidirectionalIterator
-
- org.codelibs.jhighlight.fastutil.chars.AbstractCharListIterator
-
- org.codelibs.jhighlight.fastutil.chars.CharIterators.EmptyIterator
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterator<Character>,ListIterator<Character>,BidirectionalIterator<Character>,CharBidirectionalIterator,CharIterator,CharListIterator,ObjectBidirectionalIterator<Character>,ObjectIterator<Character>
- Enclosing class:
- CharIterators
public static class CharIterators.EmptyIterator extends AbstractCharListIterator implements Serializable, Cloneable
A class returning no elements and a type-specific iterator interface.This class may be useful to implement your own in case you subclass a type-specific iterator.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmptyIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intback(int n)This method just iterates the type-specific version ofAbstractCharBidirectionalIterator.previous()for at mostntimes, stopping ifBidirectionalIterator.hasPrevious()becomes false.Objectclone()booleanhasNext()booleanhasPrevious()Returns whether there is a previous element.charnextChar()Delegates to the corresponding generic method.intnextIndex()charpreviousChar()Delegates to the corresponding generic method.intpreviousIndex()intskip(int n)This method just iterates the type-specific version ofAbstractCharIterator.next()for at mostntimes, stopping ifIterator.hasNext()becomes false.-
Methods inherited from class org.codelibs.jhighlight.fastutil.chars.AbstractCharListIterator
add, add, set, set
-
Methods inherited from class org.codelibs.jhighlight.fastutil.chars.AbstractCharBidirectionalIterator
previous
-
Methods inherited from class org.codelibs.jhighlight.fastutil.chars.AbstractCharIterator
next, remove
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.BidirectionalIterator
previous
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Methods inherited from interface java.util.ListIterator
next, previous, remove
-
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
hasPrevious
public boolean hasPrevious()
Description copied from interface:BidirectionalIteratorReturns whether there is a previous element.- Specified by:
hasPreviousin interfaceBidirectionalIterator<Character>- Specified by:
hasPreviousin interfaceListIterator<Character>- Returns:
- whether there is a previous element.
- See Also:
ListIterator.hasPrevious()
-
nextChar
public char nextChar()
Description copied from class:AbstractCharIteratorDelegates to the corresponding generic method.- Specified by:
nextCharin interfaceCharIterator- Overrides:
nextCharin classAbstractCharIterator- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
-
previousChar
public char previousChar()
Description copied from class:AbstractCharBidirectionalIteratorDelegates to the corresponding generic method.- Specified by:
previousCharin interfaceCharBidirectionalIterator- Overrides:
previousCharin classAbstractCharBidirectionalIterator- Returns:
- the previous element in the iteration.
- See Also:
ListIterator.previous()
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfaceListIterator<Character>
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfaceListIterator<Character>
-
skip
public int skip(int n)
Description copied from class:AbstractCharIteratorThis method just iterates the type-specific version ofAbstractCharIterator.next()for at mostntimes, stopping ifIterator.hasNext()becomes false.- Specified by:
skipin interfaceCharIterator- Specified by:
skipin interfaceObjectIterator<Character>- Overrides:
skipin classAbstractCharIterator- Parameters:
n- the number of elements to skip.- Returns:
- the number of elements actually skipped.
- See Also:
Iterator.next()
-
back
public int back(int n)
Description copied from class:AbstractCharBidirectionalIteratorThis method just iterates the type-specific version ofAbstractCharBidirectionalIterator.previous()for at mostntimes, stopping ifBidirectionalIterator.hasPrevious()becomes false.- Specified by:
backin interfaceCharBidirectionalIterator- Specified by:
backin interfaceObjectBidirectionalIterator<Character>- Overrides:
backin classAbstractCharBidirectionalIterator- Parameters:
n- the number of elements to skip back.- Returns:
- the number of elements actually skipped.
- See Also:
Iterator.next()
-
-