When defining an enumeration item with an integer value, this value is indented, but no the rest of the enumeration items.
By the way, if a method exists after the declaration of the items, there is no blank line before.
Input:
public enum WikipediaNamespace {
// Odd numbers correspond to the Talk namespaces
ARTICLE(0),
USER(2),
WIKIPEDIA(4),
FILE(6),
MEDIA_WIKI(8),
TEMPLATE(10),
HELP(12),
CATEGORY(14),
PORTAL(100),
WIKI_PROJECT(102),
ANNEX(104),
MODULE(828);
private static final Map<Integer, WikipediaNamespace> map =
Arrays.stream(WikipediaNamespace.values()).collect(Collectors.toMap(ns -> ns.value, ns -> ns));
[...]
}
Output (0.4.0):
public enum WikipediaNamespace {
// Odd numbers correspond to the Talk namespaces
ARTICLE(
0
), USER(2), WIKIPEDIA(4), FILE(6), MEDIA_WIKI(8), TEMPLATE(10), HELP(12), CATEGORY(14), PORTAL(100), WIKI_PROJECT(102), ANNEX(104), MODULE(828);
private static final Map<Integer, WikipediaNamespace> map = Arrays
.stream(WikipediaNamespace.values())
.collect(Collectors.toMap(ns -> ns.value, ns -> ns));
[...]
}
When defining an enumeration item with an integer value, this value is indented, but no the rest of the enumeration items.
By the way, if a method exists after the declaration of the items, there is no blank line before.
Input:
Output (0.4.0):