The Collections package contains a set of Java classes that extend or augment the Java Collections Framework. This developers guide seeks to set out rules for the naming of classes and methods within the package. The purpose of this, as with all naming standards, is to improve the coherency and consistency of the whole API.
The philosophy of the naming standards is to follow those of java.util.Collections.
Collection interfaces are new types of collections not included in Java.
SortedBag. These interfaces
Collection implementation are new implementations of collection interfaces.
These interfaces shall:
Utility classes provide additional functionality around an interface and its basic implementations. Examples include CollectionUtils and ListUtils.
Each class shall follow the naming pattern XxxUtils where Xxx relates to the
object being returned by the class, for example
BagUtils. Variations on a theme (
SortedBag as opposed
Bag) will be dealt with in one Utils class. Each Utils class
Where the method in a Utils class is a decorator, the name shall consist of
an adjective followed by the collection type. Typically such adjective is
formed by appending an -ed suffix (meaning "having"/"characterized by") to the
word describing the type of decorator. For example,
Occasionally, such construct is awkward and a more suitable adjective can be
used instead. For example,
Typically, these decorators should be implemented as non-public, static, inner classes; however, if warranted due to maintenance or other reasons, these decorator classes may be moved to top-level classes in a subpackage. The naming of such a subpackage should be discussed and agreed upon on the developers mailing list.