Author: rahul
Date: Tue Jan 8 11:54:46 2008
New Revision: 610116
URL: http://svn.apache.org/viewvc?rev=610116&view=rev
Log:
Type safety improvements.
Modified:
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Path.java
Modified:
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Path.java
URL:
http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Path.java?rev=610116&r1=610115&r2=610116&view=diff
==============================================================================
---
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Path.java
(original)
+++
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/model/Path.java
Tue Jan 8 11:54:46 2008
@@ -44,12 +44,12 @@
/**
* The list of TransitionTargets in the "up segment".
*/
- private List upSeg = new ArrayList();
+ private List<TransitionTarget> upSeg = new ArrayList<TransitionTarget>();
/**
* The list of TransitionTargets in the "down segment".
*/
- private List downSeg = new ArrayList();
+ private List<TransitionTarget> downSeg = new ArrayList<TransitionTarget>();
/**
* "Lowest" state which is not being exited nor entered by
@@ -127,8 +127,8 @@
* no order defined for siblings
* @see State#isRegion()
*/
- public final List getRegionsExited() {
- List ll = new LinkedList();
+ public final List<State> getRegionsExited() {
+ List<State> ll = new LinkedList<State>();
for (Iterator i = upSeg.iterator(); i.hasNext();) {
Object o = i.next();
if (o instanceof State) {
@@ -148,8 +148,8 @@
* defined for siblings
* @see State#isRegion()
*/
- public final List getRegionsEntered() {
- List ll = new LinkedList();
+ public final List<State> getRegionsEntered() {
+ List<State> ll = new LinkedList<State>();
for (Iterator i = downSeg.iterator(); i.hasNext();) {
Object o = i.next();
if (o instanceof State) {
@@ -179,7 +179,7 @@
*
* @return List upward segment of the path up to the scope
*/
- public final List getUpwardSegment() {
+ public final List<TransitionTarget> getUpwardSegment() {
return upSeg;
}
@@ -188,7 +188,7 @@
*
* @return List downward segment from the scope to the target
*/
- public final List getDownwardSegment() {
+ public final List<TransitionTarget> getDownwardSegment() {
return downSeg;
}
}