summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/MetaEnumeration.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/MetaEnumeration.java
downloadworlds.jar-main.tar.xz
worlds.jar-main.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/scape/MetaEnumeration.java')
-rw-r--r--NET/worlds/scape/MetaEnumeration.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/NET/worlds/scape/MetaEnumeration.java b/NET/worlds/scape/MetaEnumeration.java
new file mode 100644
index 0000000..b777f15
--- /dev/null
+++ b/NET/worlds/scape/MetaEnumeration.java
@@ -0,0 +1,74 @@
+/* */ package NET.worlds.scape;
+/* */
+/* */ import java.util.Enumeration;
+/* */ import java.util.Vector;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public class MetaEnumeration
+/* */ implements Enumeration<Object>
+/* */ {
+/* */ private Vector<?> v;
+/* */ private int index;
+/* */
+/* */ MetaEnumeration(Vector<?> v)
+/* */ {
+/* 30 */ assert (v.size() > 0);
+/* */
+/* 32 */ this.v = v;
+/* 33 */ this.index = 0;
+/* */
+/* 35 */ advanceToNext();
+/* */ }
+/* */
+/* */ public boolean hasMoreElements()
+/* */ {
+/* 40 */ return ((Enumeration)this.v.elementAt(this.index)).hasMoreElements();
+/* */ }
+/* */
+/* */ public Object nextElement()
+/* */ {
+/* 45 */ Object e = ((Enumeration)this.v.elementAt(this.index)).nextElement();
+/* 46 */ advanceToNext();
+/* 47 */ return e;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ private void advanceToNext()
+/* */ {
+/* 59 */ while (!((Enumeration)this.v.elementAt(this.index)).hasMoreElements())
+/* */ {
+/* 61 */ if (++this.index == this.v.size())
+/* */ {
+/* 63 */ this.index -= 1;
+/* 64 */ break;
+/* */ }
+/* */ }
+/* */ }
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MetaEnumeration.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file