private String
sanitize(String str) {
	if (wordcase == CASE_UPPER)
		return str.toUpperCase();
	else if (wordcase == CASE_LOWER)
		return str.toLowerCase();
	return str;
}
Checks that a numeric value is within the range [0..max]
src/main/java/core/org/xbill/DNS/Mnemonic.java