static protected void assertValidGetKey(String key) throws NullPointerException, IllegalArgumentException { assertValidKey(key); int len = key.length(); for (int i = 0; i < len; i++) { char c = key.charAt(i); int index = toNodeArrayIndex(c); if (index < 0 || index >= 10) { throw new IllegalArgumentException("Illegal key [" + key + "]: unsupported char [" + c + "] at index [" + i + "]"); } } }
static protected void assertValidGetKey(String key) throws NullPointerException, IllegalArgumentException { assertValidKey(key); int len = key.length(); for (int i = 0; i < len; i++) { char c = key.charAt(i); int index = toNodeArrayIndex(c); if (index < 0 || index >= 10) { throw new IllegalArgumentException("Illegal key [" + key + "]: unsupported char [" + c + "] at index [" + i + "]"); } } }
static protected void assertValidPutKey(String key) throws NullPointerException, IllegalArgumentException { assertValidKey(key); int len = key.length(); for (int i = 0; i < len; i++) { char c = key.charAt(i); int index = toNodeArrayIndex(c); if (index < 0) { throw new IllegalArgumentException("Illegal key [" + key + "]: unsupported char [" + c + "] at index [" + i + "]"); } else if (index == 10 && (i+1) != len) { throw new IllegalArgumentException("Illegal key [" + key + "]: [*] can only be the last char in key"); } } }
static protected void assertValidPutKey(String key) throws NullPointerException, IllegalArgumentException { assertValidKey(key); int len = key.length(); for (int i = 0; i < len; i++) { char c = key.charAt(i); int index = toNodeArrayIndex(c); if (index < 0) { throw new IllegalArgumentException("Illegal key [" + key + "]: unsupported char [" + c + "] at index [" + i + "]"); } else if (index == 10 && (i+1) != len) { throw new IllegalArgumentException("Illegal key [" + key + "]: [*] can only be the last char in key"); } } }