@Override public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2, flags | RELATIVE_OFFSET_INEXACT); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2, flags | RELATIVE_OFFSET_INEXACT); } else { throw new UnsupportedOperationException("OFFSET not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } },
@Override public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET_EXACT, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2, flags); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2, flags); } else { throw new UnsupportedOperationException("OFFSET_EXACT not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } };
public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2, flags | RELATIVE_OFFSET_INEXACT); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2, flags | RELATIVE_OFFSET_INEXACT); } else { throw new UnsupportedOperationException("OFFSET not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } },
public Range offset(Duration d) { return offset(d, RANGE_OFFSET_BEGIN | RANGE_OFFSET_END); }
public Range offset(Duration d, int offsetFlags) { return offset(d, offsetFlags, RANGE_OFFSET_BEGIN | RANGE_OFFSET_END); }
public Range offset(Duration d, int offsetFlags) { return offset(d, offsetFlags, RANGE_OFFSET_BEGIN | RANGE_OFFSET_END); }
@Override public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET_EXACT, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2, flags); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2, flags); } else { throw new UnsupportedOperationException("OFFSET_EXACT not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } };
@Override public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2, flags | RELATIVE_OFFSET_INEXACT); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2, flags | RELATIVE_OFFSET_INEXACT); } else { throw new UnsupportedOperationException("OFFSET not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } },
public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2); } else { throw new UnsupportedOperationException("OFFSET not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } },
public Temporal apply(Temporal arg1, Temporal arg2, int flags) { if (arg1 == null) { return new RelativeTime(OFFSET_EXACT, arg2); } if (arg1 instanceof Time && arg2 instanceof Duration) { return ((Time) arg1).offset((Duration) arg2, flags); } else if (arg1 instanceof Range && arg2 instanceof Duration) { return ((Range) arg1).offset((Duration) arg2, flags); } else { throw new UnsupportedOperationException("OFFSET_EXACT not implemented for arg1=" + arg1.getClass() + ", arg2=" + arg2.getClass()); } } };
public Time add(Duration offset) { if (getTimeLabel() != null) { // Time has some meaning, keep as is return new RelativeTime(this, TemporalOp.OFFSET, offset); } else return new TimeWithRange(this, range.offset(offset)); }
public Time add(Duration offset) { // TODO: Check logic // if (getTimeLabel() != null) { if (getStandardTemporalType() != null) { // Time has some meaning, keep as is return new RelativeTime(this, TemporalOp.OFFSET_EXACT, offset); } else return new TimeWithRange(this, range.offset(offset,0)); }
@Override public Time add(Duration offset) { // TODO: Check logic // if (getTimeLabel() != null) { if (getStandardTemporalType() != null) { // Time has some meaning, keep as is return new RelativeTime(this, TemporalOp.OFFSET_EXACT, offset); } else return new TimeWithRange(this, range.offset(offset,0)); }
public Range offset(Duration d, int offsetFlags) { return offset(d, offsetFlags, RANGE_OFFSET_BEGIN | RANGE_OFFSET_END); }
@Override public Time add(Duration offset) { // TODO: Check logic // if (getTimeLabel() != null) { if (getStandardTemporalType() != null) { // Time has some meaning, keep as is return new RelativeTime(this, TemporalOp.OFFSET_EXACT, offset); } else return new TimeWithRange(this, range.offset(offset,0)); }