Author: penyaskito Date: 2008-04-12 05:27:53-0700 New Revision: 14329 Modified: trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java
Log: Added typed enumeration to SimpleTimer and removed unnecessary casts. Modified: trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java?view=diff&rev=14329&p1=trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java&p2=trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java&r1=14328&r2=14329 ============================================================================== --- trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java (original) +++ trunk/src/app/src/org/argouml/util/logging/SimpleTimer.java 2008-04-12 05:27:53-0700 @@ -79,7 +79,7 @@ * * @author Linus Tolke */ - class SimpleTimerEnumeration implements Enumeration { + class SimpleTimerEnumeration implements Enumeration<String> { /** * Keep track of where we are in the list. */ @@ -95,7 +95,7 @@ /* * @see java.util.Enumeration#nextElement() */ - public Object nextElement() { + public String nextElement() { StringBuffer res = new StringBuffer(); synchronized (points) { if (count < points.size()) { @@ -107,14 +107,11 @@ res.append(" "); res.append(" "); res.setLength(60); - res - .append((((Long) points.get(count)).longValue() - ((Long) points - .get(count - 1)).longValue())); + res.append(points.get(count) - points.get(count - 1)); } else if (count == points.size()) { res.append("Total "); res.setLength(18); - res.append((((Long) points.get(points.size() - 1)) - .longValue() - ((Long) points.get(0)).longValue())); + res.append(points.get(points.size() - 1) - (points.get(0))); } } count++; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
