Summary

The Util package contains some miscellaneous utilities.

Classes

MethodCheck

MethodCheck checks for the validity of arguments passed into methods. While the OSID Runtime also performs contract enforcement, it is often helpful to perform some of these checks in other methods to catch problems before reaching the OSID such as during the construction of an OsidObject. Checks include:

import static net.okapia.osid.torrefacto.util.MethodCheck.nullarg;
 
void someMethod(org.osid.id.Id id, long startNumber, long endNumber) {
    nullarg(id, "someMethod id");
    cardinalRangeArg(startNumber, endNumber, "someMethod cardinal range");
}
    

StringUtil

Random String utilities for capitalization, selecting articles, etc.

AlphanumComparator

A Java java.util.Comparator for comparing numeric Strings.

See Also