TimeProcessor implements SearchStringProcessor { @Override public boolean canProcess(String searchString) { Pattern p = Pattern.compile(".*\\d.*"); Matcher m = p.matcher(searchString); return m.find(); }  @Override float getBoostFactor(); @Override boolean canProcess(String searchString); @Override List<String> processSearchString(String searchString);  }
@Test public void testCanProcessTimes() { assertFalse(processor.canProcess(noTime)); assertTrue(processor.canProcess(day)); assertTrue(processor.canProcess(hours)); assertTrue(processor.canProcess(week)); assertTrue(processor.canProcess(decimal)); }