StringPattern { public boolean isAllDigit() { return (pattern & ALL_DIGIT) > 0; } private  StringPattern(int pattern, int digits); boolean isAllLetter(); boolean isInitialCapitalLetter(); boolean isAllCapitalLetter(); boolean isAllLowerCaseLetter(); boolean isAllDigit(); int digits(); boolean containsPeriod(); boolean containsComma(); boolean containsSlash(); boolean containsDigit(); boolean containsHyphen(); boolean containsLetters(); static StringPattern recognize(String token);  }
@Test public void testIsAllDigit() { assertTrue(StringPattern.recognize("123456").isAllDigit()); assertFalse(StringPattern.recognize("123,56").isAllDigit()); assertFalse(StringPattern.recognize("12356f").isAllDigit()); }