Nice. Back to C/C++ enums. But seems like it's much more.

Will BSH codes be able to use that too?

Enums in general are usually int (save space). It's often annoying when some rogue codes attempt to pass in raw int(s) that do not correspond to any known/programmed enums. So, yes, using Java 1.5 enum is nice.

Jonathon

Adam Heath wrote:
How does everyone feel about using enums in ofbiz?  For pure java code,
they are a win.  For other code, that do something like:

==
myObject.someFunction(Constants.TYPE);
==

there shouldn't be any difference.  Once changed, instead of
Constants.TYPE being an int, or a String, it's a class that extends
Enum, so a recompile should be all that is nescessary.  And using enums
will ensure that an invalid int(or whatever) can't be passed.



Reply via email to