Package org.joda.time

Examples of org.joda.time.Interval.overlaps()


    if (requestInterval == null) {
      return false;
    }

    return requestInterval.overlaps(interval) || requestInterval.abuts(interval);
  }

  private Interval calculateInterval(RequestLine line) {
    if (from == null || to == null) {
      return null;
View Full Code Here


    if (requestInterval == null) {
      return false;
    }

    return requestInterval.overlaps(interval) || requestInterval.abuts(interval);
  }

  private Interval calculateInterval(RequestLine line) {
    if (from == null || to == null) {
      return null;
View Full Code Here

    for (Map.Entry<Interval, TimelineEntry> entry : timeline.entrySet()) {
      Interval timelineInterval = entry.getKey();
      TimelineEntry val = entry.getValue();

      if (timelineInterval.overlaps(interval)) {
        retVal.add(
            new TimelineObjectHolder<VersionType, ObjectType>(
                timelineInterval,
                val.getVersion(),
                val.getPartitionHolder()
View Full Code Here

  @Override
  public boolean appliesTo(Interval interval, DateTime referenceTimestamp)
  {
    final Interval currInterval = new Interval(period, referenceTimestamp);
    return currInterval.overlaps(interval) && interval.getStartMillis() >= currInterval.getStartMillis();
  }
}
View Full Code Here

    } else {
      theInterval = new Interval(interval);
    }

    for (DataSegment segment : segments) {
      if (theInterval.overlaps(segment.getInterval())) {
        dims.addAll(segment.getDimensions());
      }
    }

    return dims;
View Full Code Here

    } else {
      theInterval = new Interval(interval);
    }

    for (DataSegment segment : segments) {
      if (theInterval.overlaps(segment.getInterval())) {
        metrics.addAll(segment.getMetrics());
      }
    }

    return metrics;
View Full Code Here

                Collection<LessonInstance> lessonInstances =
                        ((LessonInstanceSpaceOccupation) roomOccupation).getLessonInstancesSet();
                getLessonInstanceOccupations(infoShowOccupations, weekStartYearMonthDay, weekEndYearMonthDay, lessonInstances);
            } else {
                for (Interval interval : roomOccupation.getIntervals()) {
                    if (search.overlaps(interval)) {
                        infoShowOccupations.add(new InfoOccupation(roomOccupation, interval));
                    }
                }
            }
        }
View Full Code Here

    public List<Interval> getEventSpaceOccupationIntervals(DateTime start, DateTime end) {
        final Interval i = new Interval(start, end);
        final List<Interval> intervals = getEventSpaceOccupationIntervals(start.toYearMonthDay(), end.toYearMonthDay());
        for (final Iterator<Interval> iterator = intervals.iterator(); iterator.hasNext();) {
            final Interval interval = iterator.next();
            if (!interval.overlaps(i)) {
                iterator.remove();
            }
        }
        return intervals;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.