Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / jssun / misc / Queue.js
index 48a0463..3a09124 100644 (file)
-Clazz.declarePackage ("jssun.misc");\r
-Clazz.load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.length = 0;\r
-this.head = null;\r
-this.tail = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.misc, "Queue");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "enqueue", \r
-function (obj) {\r
-var newElt =  new jssun.misc.QueueElement (obj);\r
-if (this.head == null) {\r
-this.head = newElt;\r
-this.tail = newElt;\r
-this.length = 1;\r
-} else {\r
-newElt.next = this.head;\r
-this.head.prev = newElt;\r
-this.head = newElt;\r
-this.length++;\r
-}this.notify ();\r
-}, "~O");\r
-Clazz.defineMethod (c$, "dequeue", \r
-function () {\r
-return this.dequeue (0);\r
-});\r
-Clazz.defineMethod (c$, "dequeue", \r
-function (timeOut) {\r
-while (this.tail == null) {\r
-swingjs.JSToolkit.warn ("Cannot wait in Queue.java");\r
-this.wait (timeOut);\r
-}\r
-var elt = this.tail;\r
-this.tail = elt.prev;\r
-if (this.tail == null) {\r
-this.head = null;\r
-} else {\r
-this.tail.next = null;\r
-}this.length--;\r
-return elt.obj;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "isEmpty", \r
-function () {\r
-return (this.tail == null);\r
-});\r
-Clazz.defineMethod (c$, "elements", \r
-function () {\r
-return  new jssun.misc.LIFOQueueEnumerator (this);\r
-});\r
-Clazz.defineMethod (c$, "reverseElements", \r
-function () {\r
-return  new jssun.misc.FIFOQueueEnumerator (this);\r
-});\r
-Clazz.defineMethod (c$, "dump", \r
-function (msg) {\r
-System.err.println (">> " + msg);\r
-System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));\r
-var cursor = this.head;\r
-var last = null;\r
-while (cursor != null) {\r
-System.err.println ("  " + cursor);\r
-last = cursor;\r
-cursor = cursor.next;\r
-}\r
-if (last !== this.tail) {\r
-System.err.println ("  tail != last: " + this.tail + ", " + last);\r
-}System.err.println ("]");\r
-}, "~S");\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.queue = null;\r
-this.cursor = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (q) {\r
-this.queue = q;\r
-this.cursor = q.tail;\r
-}, "jssun.misc.Queue");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return (this.cursor != null);\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-{\r
-if (this.cursor != null) {\r
-var result = this.cursor;\r
-this.cursor = this.cursor.prev;\r
-return result.obj;\r
-}}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");\r
-});\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.queue = null;\r
-this.cursor = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);\r
-Clazz.makeConstructor (c$, \r
-function (q) {\r
-this.queue = q;\r
-this.cursor = q.head;\r
-}, "jssun.misc.Queue");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-return (this.cursor != null);\r
-});\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-{\r
-if (this.cursor != null) {\r
-var result = this.cursor;\r
-this.cursor = this.cursor.next;\r
-return result.obj;\r
-}}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");\r
-});\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.next = null;\r
-this.prev = null;\r
-this.obj = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.misc, "QueueElement");\r
-Clazz.makeConstructor (c$, \r
-function (obj) {\r
-this.obj = obj;\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";\r
-});\r
-});\r
+Clazz.declarePackage ("jssun.misc");
+Clazz.load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.length = 0;
+this.head = null;
+this.tail = null;
+Clazz.instantialize (this, arguments);
+}, jssun.misc, "Queue");
+Clazz.makeConstructor (c$, 
+function () {
+});
+Clazz.defineMethod (c$, "enqueue", 
+function (obj) {
+var newElt =  new jssun.misc.QueueElement (obj);
+if (this.head == null) {
+this.head = newElt;
+this.tail = newElt;
+this.length = 1;
+} else {
+newElt.next = this.head;
+this.head.prev = newElt;
+this.head = newElt;
+this.length++;
+}this.notify ();
+}, "~O");
+Clazz.defineMethod (c$, "dequeue", 
+function () {
+return this.dequeue (0);
+});
+Clazz.defineMethod (c$, "dequeue", 
+function (timeOut) {
+while (this.tail == null) {
+swingjs.JSToolkit.warn ("Cannot wait in Queue.java");
+this.wait (timeOut);
+}
+var elt = this.tail;
+this.tail = elt.prev;
+if (this.tail == null) {
+this.head = null;
+} else {
+this.tail.next = null;
+}this.length--;
+return elt.obj;
+}, "~N");
+Clazz.defineMethod (c$, "isEmpty", 
+function () {
+return (this.tail == null);
+});
+Clazz.defineMethod (c$, "elements", 
+function () {
+return  new jssun.misc.LIFOQueueEnumerator (this);
+});
+Clazz.defineMethod (c$, "reverseElements", 
+function () {
+return  new jssun.misc.FIFOQueueEnumerator (this);
+});
+Clazz.defineMethod (c$, "dump", 
+function (msg) {
+System.err.println (">> " + msg);
+System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));
+var cursor = this.head;
+var last = null;
+while (cursor != null) {
+System.err.println ("  " + cursor);
+last = cursor;
+cursor = cursor.next;
+}
+if (last !== this.tail) {
+System.err.println ("  tail != last: " + this.tail + ", " + last);
+}System.err.println ("]");
+}, "~S");
+c$ = Clazz.decorateAsClass (function () {
+this.queue = null;
+this.cursor = null;
+Clazz.instantialize (this, arguments);
+}, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (q) {
+this.queue = q;
+this.cursor = q.tail;
+}, "jssun.misc.Queue");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return (this.cursor != null);
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+{
+if (this.cursor != null) {
+var result = this.cursor;
+this.cursor = this.cursor.prev;
+return result.obj;
+}}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");
+});
+c$ = Clazz.decorateAsClass (function () {
+this.queue = null;
+this.cursor = null;
+Clazz.instantialize (this, arguments);
+}, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);
+Clazz.makeConstructor (c$, 
+function (q) {
+this.queue = q;
+this.cursor = q.head;
+}, "jssun.misc.Queue");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+return (this.cursor != null);
+});
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+{
+if (this.cursor != null) {
+var result = this.cursor;
+this.cursor = this.cursor.next;
+return result.obj;
+}}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");
+});
+c$ = Clazz.decorateAsClass (function () {
+this.next = null;
+this.prev = null;
+this.obj = null;
+Clazz.instantialize (this, arguments);
+}, jssun.misc, "QueueElement");
+Clazz.makeConstructor (c$, 
+function (obj) {
+this.obj = obj;
+}, "~O");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";
+});
+});