本文整理了Java中java.time.Duration.getUnits()
方法的一些代码示例,展示了Duration.getUnits()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Duration.getUnits()
方法的具体详情如下:
包路径:java.time.Duration
类名称:Duration
方法名:getUnits
暂无
代码示例来源:origin: zeebe-io/zeebe
public Interval(Period period, Duration duration) {
this.period = period;
this.duration = duration;
this.units = new ArrayList<>();
this.units.addAll(period.getUnits());
this.units.addAll(duration.getUnits());
}
代码示例来源:origin: metatron-app/metatron-discovery
@Override
public List<TemporalUnit> getUnits() {
return Stream.concat(period.getUnits().stream(), duration.getUnits().stream())
.collect(Collectors.toList());
}
代码示例来源:origin: com.palantir.conjure.java.api/service-config
@Override
public List<TemporalUnit> getUnits() {
return toJavaDuration().getUnits();
}
代码示例来源:origin: io.zeebe/zb-bpmn-model
public Interval(Period period, Duration duration) {
this.period = period;
this.duration = duration;
this.units = new ArrayList<>();
this.units.addAll(period.getUnits());
this.units.addAll(duration.getUnits());
}
代码示例来源:origin: io.ratpack/ratpack-test
try {
if (!latch.await(timeout.toNanos(), TimeUnit.NANOSECONDS)) {
TemporalUnit unit = timeout.getUnits().get(0);
throw new IllegalStateException("Request to " + uri + " took more than " + timeout.get(unit) + " " + unit.toString() + " to complete");
内容来源于网络,如有侵权,请联系作者删除!