@Test public void testFrom() throws Exception { long delay = 15L; LocalTime time = LocalTime.now(); TimeDelay expected = TimeDelay.of(time, delay); TimeDelay actual = TimeDelay.from(expected); Assert.assertEquals(time, actual.getExpectedTime()); Assert.assertEquals(delay, actual.getDelay()); Assert.assertEquals(expected, actual); }
public static TimeDelay from(TimeDelay timeDelay) { return new TimeDelay(timeDelay.getExpectedTime(), timeDelay.getDelay()); }
TimeDelay implements Serializable, Comparable<TimeDelay> { public static TimeDelay from(TimeDelay timeDelay) { return new TimeDelay(timeDelay.getExpectedTime(), timeDelay.getDelay()); } }
TimeDelay implements Serializable, Comparable<TimeDelay> { public static TimeDelay from(TimeDelay timeDelay) { return new TimeDelay(timeDelay.getExpectedTime(), timeDelay.getDelay()); } private  TimeDelay(); private  TimeDelay(LocalTime expectedTime, Long delay); }
TimeDelay implements Serializable, Comparable<TimeDelay> { public static TimeDelay from(TimeDelay timeDelay) { return new TimeDelay(timeDelay.getExpectedTime(), timeDelay.getDelay()); } private  TimeDelay(); private  TimeDelay(LocalTime expectedTime, Long delay); static TimeDelay now(); static TimeDelay of(LocalTime expectedTime); static TimeDelay of(LocalTime expectedTime, Long delay); static TimeDelay of(LocalTime expectedTime, Long delay, TemporalUnit unit); static TimeDelay computeFrom(LocalTime expectedTime, LocalTime effectiveTime); static TimeDelay from(TimeDelay timeDelay); static TimeDelay fromWithoutDelay(TimeDelay expectedTime); TimeDelay withDelay(Long delay); boolean isAfter(TimeDelay target); boolean isBefore(TimeDelay target); LocalTime getEffectiveTime(); LocalDateTime atDate(LocalDate date); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(TimeDelay target); final LocalTime getExpectedTime(); final long getDelay(); }
TimeDelay implements Serializable, Comparable<TimeDelay> { public static TimeDelay from(TimeDelay timeDelay) { return new TimeDelay(timeDelay.getExpectedTime(), timeDelay.getDelay()); } private  TimeDelay(); private  TimeDelay(LocalTime expectedTime, Long delay); static TimeDelay now(); static TimeDelay of(LocalTime expectedTime); static TimeDelay of(LocalTime expectedTime, Long delay); static TimeDelay of(LocalTime expectedTime, Long delay, TemporalUnit unit); static TimeDelay computeFrom(LocalTime expectedTime, LocalTime effectiveTime); static TimeDelay from(TimeDelay timeDelay); static TimeDelay fromWithoutDelay(TimeDelay expectedTime); TimeDelay withDelay(Long delay); boolean isAfter(TimeDelay target); boolean isBefore(TimeDelay target); LocalTime getEffectiveTime(); LocalDateTime atDate(LocalDate date); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(TimeDelay target); final LocalTime getExpectedTime(); final long getDelay();  }