Revision: 538
Author: allain.lalonde
Date: Tue Jul 21 06:40:16 2009
Log: Marked the static instances as final
http://code.google.com/p/piccolo2d/source/detail?r=538
Modified:
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
=======================================
---
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
Sun Jul 19 16:56:41 2009
+++
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/util/PUtil.java
Tue Jul 21 06:40:16 2009
@@ -54,8 +54,12 @@
*/
public class PUtil {
- public static Iterator NULL_ITERATOR =
Collections.EMPTY_LIST.iterator();
- public static Enumeration NULL_ENUMERATION = new Enumeration() {
+ public static long DEFAULT_ACTIVITY_STEP_RATE = 20;
+ public static int ACTIVITY_SCHEDULER_FRAME_DELAY = 10;
+ private static final int PATH_IS_DONE = -1;
+
+ public static final Iterator NULL_ITERATOR =
Collections.EMPTY_LIST.iterator();
+ public static final Enumeration NULL_ENUMERATION = new Enumeration() {
public boolean hasMoreElements() {
return false;
}
@@ -64,10 +68,8 @@
return null;
}
};
- public static long DEFAULT_ACTIVITY_STEP_RATE = 20;
- public static int ACTIVITY_SCHEDULER_FRAME_DELAY = 10;
-
- public static OutputStream NULL_OUTPUT_STREAM = new OutputStream() {
+
+ public static final OutputStream NULL_OUTPUT_STREAM = new
OutputStream() {
public void close() {
}
@@ -137,13 +139,13 @@
if (!wroteStroke) {
return null;
}
-
+
boolean serializedStroke = in.readBoolean();
if (serializedStroke) {
return (Stroke) in.readObject();
}
-
- return readBasicStroke(in);
+
+ return readBasicStroke(in);
}
private static Stroke readBasicStroke(ObjectInputStream in) throws
IOException {
@@ -165,8 +167,6 @@
return new BasicStroke(lineWidth, endCap, lineJoin, miterLimit,
dash, dashPhase);
}
-
- private static final int PATH_IS_DONE = -1;
public static GeneralPath readPath(ObjectInputStream in) throws
IOException, ClassNotFoundException {
GeneralPath path = new GeneralPath();
--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---