public IsoDateTime(IsoDate date, IsoTime time) { this.date = date; this.time = time; base = JodaTimeUtils.combine(date.base, time.base); }
@Override public Instant getJodaTimeInstant() { Partial p = base; if (tod != null) { Partial p2 = tod.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (dow != null) { Partial p2 = dow.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (poy != null) { Partial p2 = poy.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } return JodaTimeUtils.getInstant(p); }
return null; Partial p = JodaTimeUtils.combine(compatible.first.base, compatible.second.base); if (t instanceof CompositePartialTime) { CompositePartialTime cpt = (CompositePartialTime) t;
return null; Partial p = JodaTimeUtils.combine(compatible.first.base, compatible.second.base);
public IsoDateTime(IsoDate date, IsoTime time) { this.date = date; this.time = time; base = JodaTimeUtils.combine(date.base, time.base); }
public IsoDateTime(IsoDate date, IsoTime time) { this.date = date; this.time = time; base = JodaTimeUtils.combine(date.base, time.base); }
public IsoDateTime(IsoDate date, IsoTime time) { this.date = date; this.time = time; base = JodaTimeUtils.combine(date.base, time.base); }
@Override public Instant getJodaTimeInstant() { Partial p = base; if (tod != null) { Partial p2 = tod.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (dow != null) { Partial p2 = dow.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (poy != null) { Partial p2 = poy.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } return JodaTimeUtils.getInstant(p); }
public Instant getJodaTimeInstant() { Partial p = base; if (tod != null) { Partial p2 = tod.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (dow != null) { Partial p2 = dow.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (poy != null) { Partial p2 = poy.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } return JodaTimeUtils.getInstant(p); }
public Instant getJodaTimeInstant() { Partial p = base; if (tod != null) { Partial p2 = tod.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (dow != null) { Partial p2 = dow.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } if (poy != null) { Partial p2 = poy.getJodaTimePartial(); if (p2 != null && JodaTimeUtils.isCompatible(p, p2)) { p = JodaTimeUtils.combine(p, p2); } } return JodaTimeUtils.getInstant(p); }
return null; Partial p = JodaTimeUtils.combine(compatible.first.base, compatible.second.base); if (t instanceof CompositePartialTime) { CompositePartialTime cpt = (CompositePartialTime) t;
public Time intersect(Time t) { if (t == null || t == TIME_UNKNOWN) return this; if (base == null) return t; if (t instanceof PartialTime) { if (!isCompatible((PartialTime) t)) { return null; } Partial p = JodaTimeUtils.combine(this.base, ((PartialTime) t).base); if (t instanceof CompositePartialTime) { CompositePartialTime cpt = (CompositePartialTime) t; Time ntod = Time.intersect(tod, cpt.tod); Time ndow = Time.intersect(dow, cpt.dow); Time npoy = Time.intersect(poy, cpt.poy); if (ntod == null && (tod != null || cpt.tod != null)) return null; if (ndow == null && (dow != null || cpt.dow != null)) return null; if (npoy == null && (poy != null || cpt.poy != null)) return null; return new CompositePartialTime(this, p, npoy, ndow, ntod); } else { return new CompositePartialTime(this, p, poy, dow, tod); } } else { return super.intersect(t); } }
public Time intersect(Time t) { if (t == null || t == TIME_UNKNOWN) return this; if (base == null) return t; if (t instanceof CompositePartialTime) { return t.intersect(this); } else if (t instanceof PartialTime) { if (!isCompatible((PartialTime) t)) { return null; } Partial p = JodaTimeUtils.combine(base, ((PartialTime) t).base); return new PartialTime(p); } else if (t instanceof GroundedTime) { return t.intersect(this); } else if (t instanceof RelativeTime) { return t.intersect(this); } else { Time cpt = makeComposite(this, t); if (cpt != null) { return cpt; } if (t instanceof InexactTime) { return t.intersect(this); } } return null; // return new RelativeTime(this, TemporalOp.INTERSECT, t); }
public Time intersect(Time t) { if (t == null || t == TIME_UNKNOWN) return this; if (base == null) return t; if (t instanceof PartialTime) { Pair<PartialTime,PartialTime> compatible = getCompatible(this, (PartialTime) t); if (compatible == null) { return null; } Partial p = JodaTimeUtils.combine(compatible.first.base, compatible.second.base); if (t instanceof CompositePartialTime) { CompositePartialTime cpt = (CompositePartialTime) t; Time ntod = Time.intersect(tod, cpt.tod); Time ndow = Time.intersect(dow, cpt.dow); Time npoy = Time.intersect(poy, cpt.poy); if (ntod == null && (tod != null || cpt.tod != null)) return null; if (ndow == null && (dow != null || cpt.dow != null)) return null; if (npoy == null && (poy != null || cpt.poy != null)) return null; return new CompositePartialTime(this, p, npoy, ndow, ntod); } else { return new CompositePartialTime(this, p, poy, dow, tod); } } else { return super.intersect(t); } }
return null; Partial p = JodaTimeUtils.combine(compatible.first.base, compatible.second.base);
return null; Partial p = JodaTimeUtils.combine(compatible.first.base, compatible.second.base);