home *** CD-ROM | disk | FTP | other *** search
- package sun.misc;
-
- import java.util.Enumeration;
- import java.util.NoSuchElementException;
-
- final class LIFOQueueEnumerator implements Enumeration {
- Queue queue;
- QueueElement cursor;
-
- LIFOQueueEnumerator(Queue var1) {
- this.queue = var1;
- this.cursor = var1.head;
- }
-
- public boolean hasMoreElements() {
- return this.cursor != null;
- }
-
- public Object nextElement() {
- Queue var2 = this.queue;
- synchronized(var2){}
-
- Object var1;
- try {
- if (this.cursor == null) {
- throw new NoSuchElementException("LIFOQueueEnumerator");
- }
-
- QueueElement var4 = this.cursor;
- this.cursor = this.cursor.next;
- var1 = var4.obj;
- } catch (Throwable var6) {
- throw var6;
- }
-
- return var1;
- }
- }
-