StringPattern { public boolean containsPeriod() { return (pattern & CONTAINS_PERIOD) > 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 testContainsPeriod() { assertTrue(StringPattern.recognize("test.").containsPeriod()); assertTrue(StringPattern.recognize("23.5").containsPeriod()); assertFalse(StringPattern.recognize("test,/-1").containsPeriod()); }