summaryrefslogtreecommitdiff
path: root/NET/worlds/scape/ShallowEnumeration.java
blob: 7a667e86e0e3951e92ead9cce635f66b3faea676 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*    */ package NET.worlds.scape;
/*    */ 
/*    */ import java.util.Vector;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ShallowEnumeration
/*    */   extends DeepEnumeration<Object>
/*    */ {
/*    */   public ShallowEnumeration(SuperRoot o)
/*    */   {
/* 20 */     this.roots.addElement(o);
/* 21 */     o.getChildren(this);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   protected void getNextElement()
/*    */   {
/* 44 */     this.valueRetrieved = false;
/* 45 */     if (!this.roots.isEmpty()) {
/* 46 */       this.nextValue = ((SuperRoot)this.roots.elementAt(this.roots.size() - 1));
/* 47 */       assert (this.nextValue != null);
/* 48 */       this.roots.removeElementAt(this.roots.size() - 1);
/* 49 */     } else if (this.currentIndex >= 0) {
/*    */       try {
/* 51 */         this.nextValue = ((SuperRoot)this.currentVector.elementAt(this.currentIndex--));
/*    */       } catch (ArrayIndexOutOfBoundsException e) {
/* 53 */         this.currentIndex = (this.currentVector.size() - 1);
/* 54 */         getNextElement();
/*    */       }
/* 56 */       if ((!$assertionsDisabled) && (this.nextValue == null)) throw new AssertionError();
/* 57 */     } else if (!this.vectors.isEmpty()) {
/* 58 */       this.currentVector = ((Vector)this.vectors.elementAt(this.vectors.size() - 1));
/* 59 */       this.currentIndex = (this.currentVector.size() - 1);
/* 60 */       this.vectors.removeElementAt(this.vectors.size() - 1);
/* 61 */       getNextElement();
/*    */     } else {
/* 63 */       this.nextValue = null;
/*    */     }
/*    */   }
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ShallowEnumeration.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */