public abstract class AbstractCharBidirectionalIterator extends AbstractCharIterator implements CharBidirectionalIterator
To create a type-specific bidirectional iterator, besides what is needed for an iterator you need both a method returning the previous element as primitive type and a method returning the previous element as an object. However, if you inherit from this class you need just one (anyone).
This class implements also a trivial version of back(int) that
uses type-specific methods.
| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
AbstractCharBidirectionalIterator() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
int |
back(int n)
This method just iterates the type-specific version of
previous() for
at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false. |
Character |
previous()
Delegates to the corresponding type-specific method.
|
char |
previousChar()
Delegates to the corresponding generic method.
|
next, nextChar, remove, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnextChar, skipskiphasPreviouspublic char previousChar()
previousChar インタフェース内 CharBidirectionalIteratorListIterator.previous()public Character previous()
previous インタフェース内 BidirectionalIterator<Character>ListIterator.previous()public int back(int n)
previous() for
at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false.back インタフェース内 CharBidirectionalIteratorback インタフェース内 ObjectBidirectionalIterator<Character>n - the number of elements to skip back.Iterator.next()Copyright © 2011-2015. All Rights Reserved.