@Test public void testDigits() { Assert.assertEquals(6, StringPattern.recognize("123456").digits()); Assert.assertEquals(3, StringPattern.recognize("123fff").digits()); Assert.assertEquals(0, StringPattern.recognize("test").digits()); Assert.assertEquals(3, StringPattern.recognize("１２３ｆｆｆ").digits()); }
public int digits() { return digits; }
StringPattern { public int digits() { return digits; } }
StringPattern { public int digits() { return digits; } private  StringPattern(int pattern, int digits); }
StringPattern { public int digits() { return digits; } private  StringPattern(int pattern, int digits); static StringPattern recognize(String token); boolean isAllLetter(); boolean isInitialCapitalLetter(); boolean isAllCapitalLetter(); boolean isAllLowerCaseLetter(); boolean isAllDigit(); boolean isAllHiragana(); boolean isAllKatakana(); int digits(); boolean containsPeriod(); boolean containsComma(); boolean containsSlash(); boolean containsDigit(); boolean containsHyphen(); boolean containsLetters(); }
StringPattern { public int digits() { return digits; } private  StringPattern(int pattern, int digits); static StringPattern recognize(String token); boolean isAllLetter(); boolean isInitialCapitalLetter(); boolean isAllCapitalLetter(); boolean isAllLowerCaseLetter(); boolean isAllDigit(); boolean isAllHiragana(); boolean isAllKatakana(); int digits(); boolean containsPeriod(); boolean containsComma(); boolean containsSlash(); boolean containsDigit(); boolean containsHyphen(); boolean containsLetters();  }