Ejemplo n.º 1
0
 public Period(Temporal temporal, Period period) throws TemporalException {
   this(
       temporal,
       period.getStartGranuleCount(period.getGranularity()),
       period.getFinishGranuleCount(period.getGranularity()),
       period.getGranularity());
 } // Period
Ejemplo n.º 2
0
 public boolean finishes(Period p2, int granularity) throws TemporalException {
   return ((getStartGranuleCount(granularity) < p2.getStartGranuleCount(granularity))
       && (getFinishGranuleCount(granularity) == p2.getFinishGranuleCount(granularity)));
 } // finishes
Ejemplo n.º 3
0
 public boolean contains(Period p2, int granularity) throws TemporalException {
   return (((p2.getStartGranuleCount(granularity) > getStartGranuleCount(granularity))
           || (p2.getStartGranuleCount(granularity) == getStartGranuleCount(granularity)))
       && ((p2.getFinishGranuleCount(granularity) < getFinishGranuleCount(granularity))
           || (p2.getFinishGranuleCount(granularity) == getFinishGranuleCount(granularity))));
 } // contains
Ejemplo n.º 4
0
 public boolean overlaps(Period p2, int granularity) throws TemporalException {
   return ((getStartGranuleCount(granularity) <= p2.getStartGranuleCount(granularity))
       && (getFinishGranuleCount(granularity) <= p2.getFinishGranuleCount(granularity))
       && (getFinishGranuleCount(granularity) >= p2.getStartGranuleCount(granularity)));
 } // overlaps
Ejemplo n.º 5
0
 public boolean after(Period p2, int granularity) throws TemporalException {
   return getStartGranuleCount(granularity) > p2.getFinishGranuleCount(granularity);
 } // after
Ejemplo n.º 6
0
 public boolean starts_after(Period p2) throws TemporalException {
   return getStartGranuleCount(Temporal.FINEST) > p2.getFinishGranuleCount(Temporal.FINEST);
 } // starts_after