Review (Updated) : 4884238 : Constants for Standard Charsets
forax at univ-mlv.fr
Wed Apr 20 01:34:46 UTC 2011
On 04/20/2011 02:22 AM, Mike Duigou wrote:
> My sentiment is for StandardCharset.
> I received offlist feedback which would support this. The pattern for enum like collections of constants has been to use the singular form; java.math.RoundingMode, java.lang.annotation.ElementType, javax.lang.model.element.ElementKind, java.lang.management.MemoryType, etc.
> The NIO 2 / JSR 203 classes use the relatively new naming convention of "Standard" for platform defined constants.
> java.util.zip.ZipConstants are package private interfaces to define int constants which is against normally recommended practice.
> Any strong reason to use the plural form?
It's the classical question "how to name an enum class ?"
If you consider that it contains several constants you will use the
if you consider it as a kind of namespace for a constant, you will use
the singular form.
From my experience, the singular form is used more than the plural form.
More information about the core-libs-dev