/** @return The given {@code duration} after this {@link PointOfTime} */ public PointOfTime add(Duration duration) { return new PointOfTime(this.ms + duration.milliseconds()); }
/** @return The given <var>duration</var> after this {@link PointOfTime} */ public PointOfTime add(Duration duration) { return new PointOfTime(this.ms + duration.milliseconds()); }
private void checkConsistency() { PointOfTime beginning = this.beginning; Duration duration = this.duration; PointOfTime ending = this.ending; // Iff all three fields are set, verify that their values are consistent. if (beginning != null && duration != null && ending != null) { if (beginning.milliseconds() + duration.milliseconds() != ending.milliseconds()) { throw new IllegalStateException(); } } } }
private void checkConsistency() { PointOfTime beginning = this.beginning; Duration duration = this.duration; PointOfTime ending = this.ending; // Iff all three fields are set, verify that their values are consistent. if (beginning != null && duration != null && ending != null) { if (beginning.milliseconds() + duration.milliseconds() != ending.milliseconds()) { throw new IllegalStateException(); } } } }
/** The beginning of this time interval */ @Nullable public PointOfTime getBeginning() { PointOfTime beginning = this.beginning; Duration duration = this.duration; PointOfTime ending = this.ending; return ( beginning == null && duration != null && ending != null ? new PointOfTime(ending.milliseconds() - duration.milliseconds()) : this.beginning ); }
/** The ending of this time interval */ @Nullable public PointOfTime getEnding() { PointOfTime beginning = this.beginning; Duration duration = this.duration; PointOfTime ending = this.ending; return ( beginning != null && duration != null && ending == null ? new PointOfTime(beginning.milliseconds() + duration.milliseconds()) : this.ending ); }
/** The ending of this time interval */ @Nullable public PointOfTime getEnding() { PointOfTime beginning = this.beginning; Duration duration = this.duration; PointOfTime ending = this.ending; return ( beginning != null && duration != null && ending == null ? new PointOfTime(beginning.milliseconds() + duration.milliseconds()) : this.ending ); }
/** The beginning of this time interval */ @Nullable public PointOfTime getBeginning() { PointOfTime beginning = this.beginning; Duration duration = this.duration; PointOfTime ending = this.ending; return ( beginning == null && duration != null && ending != null ? new PointOfTime(ending.milliseconds() - duration.milliseconds()) : this.beginning ); }
Thread.sleep(retryDelay.milliseconds()); } catch (InterruptedException ie) { throw new BuildException(ie);
this.ms = Duration.milliseconds(m.group(1)); return;
this.ms = Duration.milliseconds(m.group(1)); return;