613 |
|
} |
614 |
|
} |
615 |
|
|
616 |
+ |
/** |
617 |
+ |
* This class is nearly a mirror-image of DeqIterator, using tail |
618 |
+ |
* instead of head for initial cursor, and head instead of tail |
619 |
+ |
* for fence. |
620 |
+ |
*/ |
621 |
|
private class DescendingIterator implements Iterator<E> { |
617 |
– |
/* |
618 |
– |
* This class is nearly a mirror-image of DeqIterator, using |
619 |
– |
* tail instead of head for initial cursor, and head instead of |
620 |
– |
* tail for fence. |
621 |
– |
*/ |
622 |
|
private int cursor = tail; |
623 |
|
private int fence = head; |
624 |
|
private int lastRet = -1; |