Package org.apache.commons.lang.math

Examples of org.apache.commons.lang.math.LongRange


        if (!calendarCache.containsKey(eventTitle)) {
          calendarCache.put(eventTitle, new TimeRangeCalendar());
        }
        TimeRangeCalendar timeRangeCalendar = calendarCache.get(eventTitle);
          for (When when : event.getTimes()) {
            timeRangeCalendar.addTimeRange(new LongRange(when.getStartTime().getValue(), when.getEndTime().getValue()));
          }
      }
    }
   
    // add all calendars to the Scheduler an rebase all existing Triggers
View Full Code Here


     */
    public long getNextIncludedTime(long timeStamp) {
       long nextIncludedTime = timeStamp + ONE_MILLI;
       
        while (isTimeIncluded(nextIncludedTime)) {
          LongRange timeRange = findTimeRange(timeStamp);
            if (nextIncludedTime >= timeRange.getMinimumLong() &&
                nextIncludedTime <= timeRange.getMaximumLong()) {
               
                nextIncludedTime = timeRange.getMaximumLong() + ONE_MILLI;
            } else if ((getBaseCalendar() != null) && (!getBaseCalendar().isTimeIncluded(nextIncludedTime))){
                nextIncludedTime = getBaseCalendar().getNextIncludedTime(nextIncludedTime);
            } else {
                nextIncludedTime++;
            }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.math.LongRange

Copyright © 2018 www.massapicom. 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.