summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-07-02 21:41:57 -0700
committerHarvey Harrison <[email protected]>2013-07-02 21:41:57 -0700
commit736a280771cac7b6002aa66432b5b83ffdee0963 (patch)
tree67286755e7d1652d3ce340f6358e07ca37690a02 /src
parentb577a49f89d3f36dc28af03e1d9864577db954c5 (diff)
j3dcore: annotate targets array in Targets, remove two methods that had incorrect types
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/Targets.java26
1 files changed, 5 insertions, 21 deletions
diff --git a/src/classes/share/javax/media/j3d/Targets.java b/src/classes/share/javax/media/j3d/Targets.java
index adfff46..d151756 100644
--- a/src/classes/share/javax/media/j3d/Targets.java
+++ b/src/classes/share/javax/media/j3d/Targets.java
@@ -40,23 +40,15 @@ class Targets {
static final int BLN_TARGETS = 5; // For boundingLeaf nodes.
static final int GRP_TARGETS = 6; // For group nodes.
- ArrayList[] targetList = new ArrayList[MAX_NODELIST];
+ ArrayList<NnuId>[] targetList = new ArrayList[MAX_NODELIST];
void addNode(NnuId node, int targetType) {
if(targetList[targetType] == null)
- targetList[targetType] = new ArrayList(1);
+ targetList[targetType] = new ArrayList<NnuId>(1);
targetList[targetType].add(node);
}
- void addNodeArray(NnuId[] nodeArr, int targetType) {
- if(targetList[targetType] == null)
- targetList[targetType] = new ArrayList(1);
-
- targetList[targetType].add(nodeArr);
- }
-
-
void removeNode(int index, int targetType) {
if(targetList[targetType] != null) {
targetList[targetType].remove(index);
@@ -64,9 +56,9 @@ class Targets {
}
- void addNodes(ArrayList nodeList, int targetType) {
+ void addNodes(ArrayList<NnuId> nodeList, int targetType) {
if(targetList[targetType] == null)
- targetList[targetType] = new ArrayList(1);
+ targetList[targetType] = new ArrayList<NnuId>(1);
targetList[targetType].addAll(nodeList);
}
@@ -93,7 +85,7 @@ class Targets {
cachedTargets.targetArr[i] = nArr;
// System.err.println("Before sort : ");
// NnuIdManager.printIds(cachedTargets.targetArr[i]);
- NnuIdManager.sort((NnuId[])cachedTargets.targetArr[i]);
+ NnuIdManager.sort(cachedTargets.targetArr[i]);
// System.err.println("After sort : ");
// NnuIdManager.printIds(cachedTargets.targetArr[i]);
} else {
@@ -191,14 +183,6 @@ class Targets {
return empty;
}
- void addCachedTargets(CachedTargets cachedTargets) {
- for(int i=0; i<MAX_NODELIST; i++) {
- if (cachedTargets.targetArr[i] != null ) {
- addNodeArray(cachedTargets.targetArr[i], i);
- }
- }
- }
-
void dump() {
for(int i=0; i<Targets.MAX_NODELIST; i++) {
if (targetList[i] != null) {