From e7537349c38ccf42746517e5337d6af07ca2880b Mon Sep 17 00:00:00 2001 From: "Ray J. Greenwell" Date: Wed, 6 Aug 2014 10:44:21 -0700 Subject: [PATCH] Document these constants better. I've got half a mind to change the default to ORDINAL and let yohoho cope. --- core/src/main/java/com/threerings/io/Streamer.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/threerings/io/Streamer.java b/core/src/main/java/com/threerings/io/Streamer.java index 3199d1e6a..e2224bd6f 100644 --- a/core/src/main/java/com/threerings/io/Streamer.java +++ b/core/src/main/java/com/threerings/io/Streamer.java @@ -999,7 +999,18 @@ public abstract class Streamer */ protected enum EnumPolicy { - NAME, NAME_WITH_BYTE_ENUM, ORDINAL, ORDINAL_WITH_BYTE_ENUM; + /** Stream enums using the name of the enum constant. */ + NAME, + + /** Use bytes if the enum is a ByteEnum, otherwise use the name. This is the OLD DEFAULT. */ + NAME_WITH_BYTE_ENUM, + + /** Stream using the ordinal: a byte, short, or int; depending on the size of the enum. + * I would like to change this to be the default. */ + ORDINAL, + + /** Use bytes if the enum is a ByteEnum, otherwise use the ordinal. */ + ORDINAL_WITH_BYTE_ENUM; /** * Create the static enum policy by checking the com.threerings.io.enumPolicy system prop.