aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/share
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-06-24 01:14:44 -0700
committerHarvey Harrison <[email protected]>2012-06-24 01:14:44 -0700
commit8237ea93f5fc1f4ef6ecc32c0941db0f150ab6bb (patch)
tree64176af327082e930f73e783c15e41874038a924 /src/classes/share
parente563fd2bd10490586e908b28dd066361bdab00cf (diff)
j3dcore: annotate some lists in GeometryArrayRetained
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes/share')
-rw-r--r--src/classes/share/javax/media/j3d/GeometryArrayRetained.java36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
index b8712c0..68bd9a6 100644
--- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
+++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java
@@ -340,13 +340,13 @@ abstract class GeometryArrayRetained extends GeometryRetained{
static final int INIT_MIRROR_GEOMETRY = 0x02;
- // A list of Universes that this Geometry is referenced in Morph from
- ArrayList morphUniverseList = null;
+// A list of Universes that this Geometry is referenced in Morph from
+ArrayList<VirtualUniverse> morphUniverseList = null;
- // A list of ArrayLists which contain all the MorphRetained objects
- // refering to this geometry. Each list corresponds to the universe
- // above.
- ArrayList morphUserLists = null;
+// A list of ArrayLists which contain all the MorphRetained objects
+// refering to this geometry. Each list corresponds to the universe
+// above.
+ArrayList<ArrayList<MorphRetained>> morphUserLists = null;
// The following variables are only used in compile mode
@@ -3476,8 +3476,6 @@ abstract class GeometryArrayRetained extends GeometryRetained{
void sendDataChangedMessage(boolean coordinatesChanged) {
J3dMessage[] m;
int i, j, k, index, numShapeMessages, numMorphMessages;
- ArrayList morphList;
- MorphRetained morph;
synchronized(liveStateLock) {
if (source != null && source.isLive()) {
@@ -3547,11 +3545,10 @@ abstract class GeometryArrayRetained extends GeometryRetained{
if (numMorphMessages > 0) {
synchronized (morphUniverseList) {
for (i = 0; i < numMorphMessages; i++, k++) {
- morphList = (ArrayList)morphUserLists.get(i);
- for (j=0; j<morphList.size(); j++) {
- morph = (MorphRetained)morphList.get(j);
- morph.updateMorphedGeometryArray(this, coordinatesChanged);
- }
+ ArrayList<MorphRetained> morphList = morphUserLists.get(i);
+ for (j = 0; j < morphList.size(); j++) {
+ morphList.get(j).updateMorphedGeometryArray(this, coordinatesChanged);
+ }
}
}
}
@@ -10684,20 +10681,18 @@ abstract class GeometryArrayRetained extends GeometryRetained{
// This adds a MorphRetained to the list of users of this geometry
void addMorphUser(MorphRetained m) {
int index;
- ArrayList morphList;
if(morphUniverseList == null) {
- morphUniverseList = new ArrayList(1);
- morphUserLists = new ArrayList(1);
+ morphUniverseList = new ArrayList<VirtualUniverse>(1);
+ morphUserLists = new ArrayList<ArrayList<MorphRetained>>(1);
}
synchronized (morphUniverseList) {
if (morphUniverseList.contains(m.universe)) {
index = morphUniverseList.indexOf(m.universe);
- morphList = (ArrayList)morphUserLists.get(index);
- morphList.add(m);
+ morphUserLists.get(index).add(m);
} else {
morphUniverseList.add(m.universe);
- morphList = new ArrayList(5);
+ ArrayList<MorphRetained> morphList = new ArrayList<MorphRetained>(5);
morphList.add(m);
morphUserLists.add(morphList);
}
@@ -10707,14 +10702,13 @@ abstract class GeometryArrayRetained extends GeometryRetained{
// This adds a MorphRetained to the list of users of this geometry
void removeMorphUser(MorphRetained m) {
int index;
- ArrayList morphList;
if(morphUniverseList == null)
return;
synchronized (morphUniverseList) {
index = morphUniverseList.indexOf(m.universe);
- morphList = (ArrayList)morphUserLists.get(index);
+ ArrayList<MorphRetained> morphList = morphUserLists.get(index);
morphList.remove(morphList.indexOf(m));
if (morphList.size() == 0) {
morphUserLists.remove(index);