9
|
How about
| ||||||||
|
7
|
For a small enum like this, I find the most readable solution to be:
| ||
3
|
Create an abstract method, and have each of your enumeration values override it. Since you know the opposite while you're creating it, there's no need to dynamically generate or create it.
It doesn't read nicely though; perhaps a
switch would be more manageable?
| ||
2
|
Yes we do it the time. You return a static instance rather than a new Object
| |||
d.getCode() * -1
==-d.getCode()
– Doorknob Sep 18 at 22:59