@Test public void testToMillis() { assertThat(TimeUnitExt.toMillis("1m").get()).isEqualTo(60_000); }
public static Optional<Long> toMillis(String intervalWithUnit) { return parse(intervalWithUnit).map(p -> p.getRight().toMillis(p.getLeft())); }
TimeUnitExt { public static Optional<Long> toMillis(String intervalWithUnit) { return parse(intervalWithUnit).map(p -> p.getRight().toMillis(p.getLeft())); } }
TimeUnitExt { public static Optional<Long> toMillis(String intervalWithUnit) { return parse(intervalWithUnit).map(p -> p.getRight().toMillis(p.getLeft())); }  }
TimeUnitExt { public static Optional<Long> toMillis(String intervalWithUnit) { return parse(intervalWithUnit).map(p -> p.getRight().toMillis(p.getLeft())); }  static Optional<Pair<Long, TimeUnit>> parse(String intervalWithUnit); static Optional<Long> toMillis(String intervalWithUnit); }
TimeUnitExt { public static Optional<Long> toMillis(String intervalWithUnit) { return parse(intervalWithUnit).map(p -> p.getRight().toMillis(p.getLeft())); }  static Optional<Pair<Long, TimeUnit>> parse(String intervalWithUnit); static Optional<Long> toMillis(String intervalWithUnit);  }