home *** CD-ROM | disk | FTP | other *** search
- package javax.awt.swing.tree;
-
- import java.util.NoSuchElementException;
-
- final class DefaultMutableTreeNode$BreadthFirstEnumeration$Queue {
- // $FF: synthetic field
- private final DefaultMutableTreeNode.BreadthFirstEnumeration this$1;
- DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode head;
- DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode tail;
-
- public void enqueue(Object anObject) {
- if (this.head == null) {
- this.head = this.tail = new DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode(this, anObject, (DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode)null);
- } else {
- this.tail.next = new DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode(this, anObject, (DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode)null);
- this.tail = this.tail.next;
- }
-
- }
-
- public Object dequeue() {
- if (this.head == null) {
- throw new NoSuchElementException("No more elements");
- } else {
- Object retval = this.head.object;
- DefaultMutableTreeNode.BreadthFirstEnumeration.Queue.QNode oldHead = this.head;
- this.head = this.head.next;
- if (this.head == null) {
- this.tail = null;
- } else {
- oldHead.next = null;
- }
-
- return retval;
- }
- }
-
- public Object firstObject() {
- if (this.head == null) {
- throw new NoSuchElementException("No more elements");
- } else {
- return this.head.object;
- }
- }
-
- public boolean isEmpty() {
- return this.head == null;
- }
-
- DefaultMutableTreeNode$BreadthFirstEnumeration$Queue(DefaultMutableTreeNode.BreadthFirstEnumeration this$1) {
- this.this$1 = this$1;
- this.this$1 = this$1;
- }
- }
-