summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-02-23 17:08:44 -0800
committerHarvey Harrison <[email protected]>2013-02-23 17:08:44 -0800
commit74a75322a51176756f54aa2fc18fa914b4e9da1b (patch)
tree3d55a23429994a4ab976df59e7d51cf429d318c0 /src
parent3447173a4a434e04bf1957d996159fa3aa3bc213 (diff)
j3dcore: annotate getScopes methods to return Enumeration<Group>
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/Light.java30
-rw-r--r--src/classes/share/javax/media/j3d/LightRetained.java16
2 files changed, 23 insertions, 23 deletions
diff --git a/src/classes/share/javax/media/j3d/Light.java b/src/classes/share/javax/media/j3d/Light.java
index 0af5da4..affaf9b 100644
--- a/src/classes/share/javax/media/j3d/Light.java
+++ b/src/classes/share/javax/media/j3d/Light.java
@@ -436,20 +436,20 @@ public abstract class Light extends Leaf {
}
- /**
- * Returns an enumeration of this Light node's list of scopes.
- * @return an Enumeration object containing all nodes in this Light node's
- * list of scopes.
- * @exception CapabilityNotSetException if appropriate capability is
- * not set and this object is part of live or compiled scene graph
- */
- public Enumeration getAllScopes() {
- if (isLiveOrCompiled())
- if(!this.getCapability(ALLOW_SCOPE_READ))
- throw new CapabilityNotSetException(J3dI18N.getString("Light8"));
+/**
+ * Returns an enumeration of this Light node's list of scopes.
+ * @return an Enumeration object containing all nodes in this Light node's
+ * list of scopes.
+ * @exception CapabilityNotSetException if appropriate capability is
+ * not set and this object is part of live or compiled scene graph
+ */
+public Enumeration<Group> getAllScopes() {
+if (isLiveOrCompiled())
+ if(!this.getCapability(ALLOW_SCOPE_READ))
+ throw new CapabilityNotSetException(J3dI18N.getString("Light8"));
- return (Enumeration) ((LightRetained)this.retained).getAllScopes();
- }
+return ((LightRetained)this.retained).getAllScopes();
+}
/**
@@ -668,10 +668,10 @@ public abstract class Light extends Leaf {
rt.initColor(c);
rt.initInfluencingBounds(attr.getInfluencingBounds());
- Enumeration elm = attr.getAllScopes();
+ Enumeration<Group> elm = attr.getAllScopes();
while (elm.hasMoreElements()) {
// this reference will set correctly in updateNodeReferences() callback
- rt.initAddScope((Group) elm.nextElement());
+ rt.initAddScope(elm.nextElement());
}
// this reference will set correctly in updateNodeReferences() callback
diff --git a/src/classes/share/javax/media/j3d/LightRetained.java b/src/classes/share/javax/media/j3d/LightRetained.java
index 0eda957..7ab15e5 100644
--- a/src/classes/share/javax/media/j3d/LightRetained.java
+++ b/src/classes/share/javax/media/j3d/LightRetained.java
@@ -342,18 +342,18 @@ ArrayList<LightRetained> newlyAddedMirrorLights = new ArrayList<LightRetained>()
return (Group)scopes.elementAt(index).source;
}
- /**
- * Returns an enumeration object of the scope
- * @return an enumeration object of the scope
- */
- Enumeration getAllScopes() {
+/**
+ * Returns an enumeration object of the scope
+ * @return an enumeration object of the scope
+ */
+Enumeration<Group> getAllScopes() {
Enumeration<GroupRetained> elm = scopes.elements();
- Vector v = new Vector(scopes.size());
+ Vector<Group> v = new Vector<Group>(scopes.size());
while (elm.hasMoreElements()) {
- v.add(elm.nextElement().source);
+ v.add((Group)elm.nextElement().source);
}
return v.elements();
- }
+}
/**
* Appends the specified scope to this node's list of scopes.