((PartialTime) start).withStandardFields();
private static Range getIntersectedRange(CompositePartialTime cpt, Range r, Duration d) { Time beginTime = r.beginTime(); Time endTime = r.endTime(); if (beginTime != TIME_UNKNOWN && endTime != TIME_UNKNOWN) { Time t1 = cpt.intersect(r.beginTime()); if (t1 instanceof PartialTime) { ((PartialTime) t1).withStandardFields(); } Time t2 = cpt.intersect(r.endTime()); if (t2 instanceof PartialTime) { ((PartialTime) t2).withStandardFields(); } return new Range(t1, t2, d); } else if (beginTime != TIME_UNKNOWN && endTime == TIME_UNKNOWN) { Time t1 = cpt.intersect(r.beginTime()); if (t1 instanceof PartialTime) { ((PartialTime) t1).withStandardFields(); } Time t2 = t1.add(d); if (t2 instanceof PartialTime) { ((PartialTime) t2).withStandardFields(); } return new Range(t1, t2, d); } else { throw new RuntimeException("Unsupported range: " + r); } }
((PartialTime) start).withStandardFields();
((PartialTime) start).withStandardFields();
((PartialTime) start).withStandardFields();
Time t1 = cpt.intersect(r.beginTime()); if (t1 instanceof PartialTime) { ((PartialTime) t1).withStandardFields(); ((PartialTime) t2).withStandardFields();
Time t1 = cpt.intersect(r.beginTime()); if (t1 instanceof PartialTime) { ((PartialTime) t1).withStandardFields(); ((PartialTime) t2).withStandardFields();
private static Range getIntersectedRange(CompositePartialTime cpt, Range r, Duration d) { Time beginTime = r.beginTime(); Time endTime = r.endTime(); if (beginTime != TIME_UNKNOWN && endTime != TIME_UNKNOWN) { Time t1 = cpt.intersect(r.beginTime()); if (t1 instanceof PartialTime) { ((PartialTime) t1).withStandardFields(); } Time t2 = cpt.intersect(r.endTime()); if (t2 instanceof PartialTime) { ((PartialTime) t2).withStandardFields(); } return new Range(t1, t2, d); } else if (beginTime != TIME_UNKNOWN && endTime == TIME_UNKNOWN) { Time t1 = cpt.intersect(r.beginTime()); if (t1 instanceof PartialTime) { ((PartialTime) t1).withStandardFields(); } Time t2 = t1.add(d); if (t2 instanceof PartialTime) { ((PartialTime) t2).withStandardFields(); } return new Range(t1, t2, d); } else { throw new RuntimeException("Unsupported range: " + r); } }