Dataman Coding Patterns

Dataman uses some coding patterns that some may find unfamiliar.

Nested classes
Nested classes are used to reduce the size of the global namespace, to minimize cyclic dependencies, and to clarify dependency relationships.

A nested class is like an inner class except that it is declared 'static'. Unlike an inner class, a nested class does not have an implicit reference to the object that created it.

Here are some examples of where nested classes are preferred over package-scope classes:

Public default constructors for utility classes
Utility classes often forbid default construction. Many Dataman utility classes allow default construction. This allows clients to create an object to simplify access. Most of the time this isn't necessary, but that doesn't mean it should be prevented.