[SNMP4J] SMIConstants: interface or class?

Frank Fock fock at agentpp.com
Mon May 10 20:24:38 CEST 2004


Hi Richard,

Yes, it's better to make them a final class. That was just a reflex
from my early Java programming days where using interfaces for
constants was popular.

However, using the typesafe enumeration pattern seems to be
more overhead than advantage to me. Applying the pattern to
all constants in SNMP4J will create a couple of new classes and
a lot of more indirections which will also slow down the code a
bit. How do other's think about applying the tyesafe enumeration
pattern?

Best regards,
Frank

Beton, Richard wrote:

> Doh!
>
> I meant to say 'SnmpConstants', which should be a public final class.
>
> :-)
>





More information about the SNMP4J mailing list