diff options
author | Harvey Harrison <[email protected]> | 2012-01-07 16:47:44 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-01-07 16:47:44 -0800 |
commit | 69b141acbc673aa38aee1bfbaa58f69fb680fd60 (patch) | |
tree | 170a1beafb3c8e03e219a94c67ba8a4860ef3c86 /src/classes | |
parent | 14df4d3c9fbfd3f1944281bece6b54cac8414fc0 (diff) |
j3dcore: annotate OrderedCollection lists in OrderedBin
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/share/javax/media/j3d/OrderedBin.java | 26 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/RenderBin.java | 16 |
2 files changed, 21 insertions, 21 deletions
diff --git a/src/classes/share/javax/media/j3d/OrderedBin.java b/src/classes/share/javax/media/j3d/OrderedBin.java index 48619e4..e15abad 100644 --- a/src/classes/share/javax/media/j3d/OrderedBin.java +++ b/src/classes/share/javax/media/j3d/OrderedBin.java @@ -38,8 +38,8 @@ import java.util.ArrayList; * a child of the OrderedGroup */ class OrderedBin extends Object { - // ArrayList of orderedCollection, one for each child of the orderedGroup - ArrayList orderedCollections = new ArrayList(); +// ArrayList of orderedCollection, one for each child of the orderedGroup +ArrayList<OrderedCollection> orderedCollections = new ArrayList<OrderedCollection>(); // orderedGroup source OrderedGroupRetained source; @@ -48,14 +48,14 @@ class OrderedBin extends Object { boolean onUpdateList = false; - // Value of already existing orderedCollection - ArrayList setOCForCI = new ArrayList(); - ArrayList valueOfSetOCForCI = new ArrayList(); +// Value of already existing orderedCollection +ArrayList<Integer> setOCForCI = new ArrayList<Integer>(); +ArrayList<OrderedCollection> valueOfSetOCForCI = new ArrayList<OrderedCollection>(); - // Value of orderedCollection based on oi, these arrays - // have size > 0 only during update_view; - ArrayList setOCForOI = new ArrayList(); - ArrayList valueOfSetOCForOI = new ArrayList(); +// Value of orderedCollection based on oi, these arrays +// have size > 0 only during update_view; +ArrayList<Integer> setOCForOI = new ArrayList<Integer>(); +ArrayList<OrderedCollection> valueOfSetOCForOI = new ArrayList<OrderedCollection>(); OrderedBin(int nchildren, OrderedGroupRetained src){ int i; @@ -71,8 +71,8 @@ class OrderedBin extends Object { // Add the setValues first, since they reflect already existing // orderedCollection for (i = 0; i < setOCForCI.size(); i++) { - index = ((Integer)setOCForCI.get(i)).intValue(); - OrderedCollection oc = (OrderedCollection)valueOfSetOCForCI.get(i); + index = setOCForCI.get(i).intValue(); + OrderedCollection oc = valueOfSetOCForCI.get(i); orderedCollections.set(index, oc); } @@ -93,8 +93,8 @@ class OrderedBin extends Object { // the childIds for the next frame, use the table to set the oc at the // correct place for (i = 0; i < setOCForOI.size(); i++) { - index = ((Integer)setOCForOI.get(i)).intValue(); - OrderedCollection oc = (OrderedCollection)valueOfSetOCForOI.get(i); + index = setOCForOI.get(i).intValue(); + OrderedCollection oc = valueOfSetOCForOI.get(i); int ci = source.orderedChildIdTable[index]; orderedCollections.set(ci, oc); } diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java index 119ddae..ac611f0 100644 --- a/src/classes/share/javax/media/j3d/RenderBin.java +++ b/src/classes/share/javax/media/j3d/RenderBin.java @@ -4467,7 +4467,7 @@ System.err.println("......tb.soleUser= " + OrderedGroupRetained og; OrderedCollection oc = null; - ArrayList ocs; + ArrayList<OrderedCollection> ocs; ArrayList parentChildOrderedBins; OrderedBin parentOrderedBin; int parentOrderedChildId; @@ -4543,9 +4543,9 @@ System.err.println("......tb.soleUser= " + // If we are in the update_view case then check the oi // exists in the setOCForOI list .. for (n = 0; n < ob.setOCForOI.size(); n++) { - val = ((Integer)ob.setOCForOI.get(n)).intValue(); + val = ob.setOCForOI.get(n).intValue(); if (oi == val) { - oc = (OrderedCollection)ob.valueOfSetOCForOI.get(n); + oc = ob.valueOfSetOCForOI.get(n); found = true; } } @@ -4574,10 +4574,10 @@ System.err.println("......tb.soleUser= " + ci = og.orderedChildIdTable[oi]; for (n = 0; n < ob.setOCForCI.size(); n++) { - val = ((Integer)ob.setOCForCI.get(n)).intValue(); + val = ob.setOCForCI.get(n).intValue(); if (val == ci) { - oc=(OrderedCollection)ob.valueOfSetOCForCI.get(n); + oc = ob.valueOfSetOCForCI.get(n); if (oc == null) { oc = new OrderedCollection(); ob.valueOfSetOCForCI.set(n, oc); @@ -4587,7 +4587,7 @@ System.err.println("......tb.soleUser= " + } } if (n == ob.setOCForCI.size()) { - oc = (OrderedCollection)ocs.get(ci); + oc = ocs.get(ci); if (oc == null) { oc = new OrderedCollection(); ob.setOCForCI.add(new Integer(ci)); @@ -5216,7 +5216,7 @@ System.err.println("......tb.soleUser= " + else { index = i; } - oc = (OrderedCollection)orderedBin.orderedCollections.get(index); + oc = orderedBin.orderedCollections.get(index); if (isDecal) { if (index==0) { // first child cv.setDepthBufferEnableOverride(true); @@ -5914,7 +5914,7 @@ System.err.println("......tb.soleUser= " + void removeOrderedBin(OrderedBin ob) { int i, k; for (i = 0; i < ob.orderedCollections.size(); i++) { - OrderedCollection oc = (OrderedCollection) ob.orderedCollections.get(i); + OrderedCollection oc = ob.orderedCollections.get(i); if (oc == null) continue; |