@Test public void should_transform_from_seconds_and_minutes_string_to_milliseconds() { final long milliseconds = Timespan.toMilliseconds("1m30s"); assertThat(milliseconds, is(90000L)); }
public static long toMilliseconds(String timespan) { return parseTimespan(timespan).getDurationInMilliseconds(); }
Timespan implements Serializable { public static long toMilliseconds(String timespan) { return parseTimespan(timespan).getDurationInMilliseconds(); } }
Timespan implements Serializable { public static long toMilliseconds(String timespan) { return parseTimespan(timespan).getDurationInMilliseconds(); } Timespan(long durationInMilliseconds);  Timespan(long duration, TimeUnit timeUnit); }
Timespan implements Serializable { public static long toMilliseconds(String timespan) { return parseTimespan(timespan).getDurationInMilliseconds(); } Timespan(long durationInMilliseconds);  Timespan(long duration, TimeUnit timeUnit); TimeUnit getTimeUnit(); long getDuration(); Timespan add(Timespan other); Timespan substractWithZeroFloor(Timespan other); long getDurationInMilliseconds(); long getDuration(TimeUnit timeUnit); long getDurationInSeconds(); long getDurationInMinutes(); long getDurationInHours(); Timespan toMillisecondsTimespan(); Timespan truncate(TimeUnit timeUnit); EnumMap<TimeUnit, Timespan> getCanonicalTimespans(); String getCanonicalString(); EnumMap<TimeUnit, Timespan> getAsTimespans(EnumSet<TimeUnit> timeUnits); Timespan filter(EnumSet<TimeUnit> timeUnits); String getAsString(EnumSet<TimeUnit> timeUnits); boolean equalsDurationInMilliseconds(Timespan timespan); long futureTimeMillis(long baseMilliseconds); long pastTimeMillis(long baseMillis); Date futureDate(Date baseDate); Date pastDate(Date baseDate); @Override String toString(); static Timespan create(Timespan... timespans); static Timespan parse(String timespan); static Timespan valueOf(String timespan); static Timespan milliseconds(long milliseconds); static Timespan seconds(long seconds); static Timespan minutes(long minutes); static Timespan parseTimespan(String timespan); static long toMilliseconds(String timespan); }
Timespan implements Serializable { public static long toMilliseconds(String timespan) { return parseTimespan(timespan).getDurationInMilliseconds(); } Timespan(long durationInMilliseconds);  Timespan(long duration, TimeUnit timeUnit); TimeUnit getTimeUnit(); long getDuration(); Timespan add(Timespan other); Timespan substractWithZeroFloor(Timespan other); long getDurationInMilliseconds(); long getDuration(TimeUnit timeUnit); long getDurationInSeconds(); long getDurationInMinutes(); long getDurationInHours(); Timespan toMillisecondsTimespan(); Timespan truncate(TimeUnit timeUnit); EnumMap<TimeUnit, Timespan> getCanonicalTimespans(); String getCanonicalString(); EnumMap<TimeUnit, Timespan> getAsTimespans(EnumSet<TimeUnit> timeUnits); Timespan filter(EnumSet<TimeUnit> timeUnits); String getAsString(EnumSet<TimeUnit> timeUnits); boolean equalsDurationInMilliseconds(Timespan timespan); long futureTimeMillis(long baseMilliseconds); long pastTimeMillis(long baseMillis); Date futureDate(Date baseDate); Date pastDate(Date baseDate); @Override String toString(); static Timespan create(Timespan... timespans); static Timespan parse(String timespan); static Timespan valueOf(String timespan); static Timespan milliseconds(long milliseconds); static Timespan seconds(long seconds); static Timespan minutes(long minutes); static Timespan parseTimespan(String timespan); static long toMilliseconds(String timespan); final static Timespan ZERO_YEARS; final static Timespan ZERO_MONTHS; final static Timespan ZERO_WEEKS; final static Timespan ZERO_DAYS; final static Timespan ZERO_HOURS; final static Timespan ZERO_MINUTES; final static Timespan ZERO_SECONDS; final static Timespan ZERO_MILLISECONDS; final static Timespan ONE_SECOND; final static Timespan ONE_MINUTE; }