@Test public void parseString3() throws ParseException { long millis = new TimePeriod("5 a 3h 5 min").toMillis(); assertThat(millis).isEqualTo(5L * 365 * 24 * 3600 * 1000 + 3 * 3600 * 1000 + 5 * 60 * 1000); }
public long toMillis() { return millis; }
TimePeriod { public long toMillis() { return millis; } }
TimePeriod { public long toMillis() { return millis; } TimePeriod(String string);  TimePeriod(long millis); }
TimePeriod { public long toMillis() { return millis; } TimePeriod(String string);  TimePeriod(long millis); @Override String toString(); String toString(final TimeUnit ... timeUnits); String toString(final Collection<TimeUnit> timeUnits); long toMillis(); Map<TimeUnit, Long> toTimeUnitMap(); Map<TimeUnit, Long> toTimeUnitMap(final TimeUnit ... timeUnits); Map<TimeUnit, Long> toTimeUnitMap(Collection<TimeUnit> timeUnits); @Override int hashCode(); @Override boolean equals(Object obj); }
TimePeriod { public long toMillis() { return millis; } TimePeriod(String string);  TimePeriod(long millis); @Override String toString(); String toString(final TimeUnit ... timeUnits); String toString(final Collection<TimeUnit> timeUnits); long toMillis(); Map<TimeUnit, Long> toTimeUnitMap(); Map<TimeUnit, Long> toTimeUnitMap(final TimeUnit ... timeUnits); Map<TimeUnit, Long> toTimeUnitMap(Collection<TimeUnit> timeUnits); @Override int hashCode(); @Override boolean equals(Object obj);  }