Tuure Laurinolli wrote:
Stuart Scott wrote:
I noticed that the various getEnum/putEnum methods in IoBuffer use the
signed values of the various data types. As Enums cannot have negative
ordinals would it not be more useful to use the unsigned version of the
data type?
What unsigned version would that be? There is only one unsigned
integral data type in Java, and that is char (JLS 4.2.1). Also,
handling shorter integral types in Java is tiresome, since they get
cast to int as soon as you apply some operator to them (JLS 15.x).
Also you can store negative value in an enum, assuming you affect this
value instead of using the default incremental value.
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org