@Test public void testParserOnDayPeriod() throws ParseException { final String timeInterval = "2011-10-10T10:11:12.000Z/2011-10-14T10:11:12.000Z/P2D"; List<Date> time = PARSER.parse(timeInterval); assertEquals(3, time.size()); assertEquals(1318241472000l, time.get(0).getTime()); assertEquals(1318241472000l + (3600 * 1000 * 48), time.get(1).getTime()); }
public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } TimeParser(); }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } TimeParser(); List<Date> parse(String value); }
TimeParser { public List<Date> parse(String value) throws ParseException { Collection results = parser.parse(value); List<Date> dates = (List<Date>) results.stream() .filter(o -> o instanceof Date) .map(o -> (Date) o) .collect(Collectors.toList()); return dates; } TimeParser(); List<Date> parse(String value);  }