summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2010-05-18 16:31:03 +0000
committeraclement <aclement>2010-05-18 16:31:03 +0000
commit4f36eb7b1e823369b5889fde41caac54907fb138 (patch)
tree9040949cbe115a6f06fdc2908482f6593d7378cd
parentccb9dc3c39591d7d2e29e4fe0b0ace12ea6ff9ff (diff)
downloadaspectj-4f36eb7b1e823369b5889fde41caac54907fb138.tar.gz
aspectj-4f36eb7b1e823369b5889fde41caac54907fb138.zip
formatted
-rw-r--r--util/src/org/aspectj/util/TypeSafeEnum.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/util/src/org/aspectj/util/TypeSafeEnum.java b/util/src/org/aspectj/util/TypeSafeEnum.java
index e029a6204..99d223143 100644
--- a/util/src/org/aspectj/util/TypeSafeEnum.java
+++ b/util/src/org/aspectj/util/TypeSafeEnum.java
@@ -10,7 +10,6 @@
* Xerox/PARC initial implementation
* ******************************************************************/
-
package org.aspectj.util;
import java.io.*;
@@ -24,14 +23,21 @@ public class TypeSafeEnum {
if (key > Byte.MAX_VALUE || key < Byte.MIN_VALUE) {
throw new IllegalArgumentException("key doesn't fit into a byte: " + key);
}
- this.key = (byte)key;
+ this.key = (byte) key;
+ }
+
+ public String toString() {
+ return name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public byte getKey() {
+ return key;
}
-
- public String toString() { return name; }
-
- public String getName() { return name; }
- public byte getKey() { return key; }
-
+
public void write(DataOutputStream s) throws IOException {
s.writeByte(key);
}