Package java.util

Examples of java.util.GregorianCalendar.after()


      // we are sending keep alive packets once in a minute
      // to keep the Yahoo connection up.
      GregorianCalendar now = new GregorianCalendar();
      prevKeepAliveTime.add(GregorianCalendar.SECOND, 59);
      if(now.after(prevKeepAliveTime))
      {
        Packet pack = new Packet(SERVICE_PING, STATUS_AVAILABLE, sessionID);
        sendToWriterThread(pack);

        prevKeepAliveTime = now;
View Full Code Here


        waitAjax(webDriver).withTimeout(30, TimeUnit.SECONDS).until().element(dateElement).text().not().equalTo(date);

        GregorianCalendar calendarAfterPush = initializeCalendarFromDateRetriever(dateElement.getText());
        assertTrue("The time after " + whatServerAction + "is before the initial time! You are returning to the past!",
            calendarAfterPush.after(calendarInitial));
        Integer deviation = computeDeviation(calendarInitial, calendarAfterPush);
        assertTrue("Deviaton: " + deviation + " between two " + whatServerAction + "s/es is either too "
            + "big (more than one minute/hour) or too small(zero)", deviation > 0);
        return deviation;
    }
View Full Code Here

    int currentDay = c.get(Calendar.DAY_OF_MONTH);

    Calendar current = new GregorianCalendar(currentYear,
        currentMonth, currentDay);

    return current.after(fermeture);
  }

}
View Full Code Here

    int currentDay = c.get(Calendar.DAY_OF_MONTH);
   
    Calendar current = new GregorianCalendar(currentYear,
        currentMonth, currentDay);

    return current.after(fermeture);
  }
}
View Full Code Here

       
        rooms.remove(booking.getRoom());
         
      }
     
      if((beginDate.equals(startDate) && finishDate.equals(endDate)) || (beginDate.before(startDate) && finishDate.after(endDate)))
       
      {
       
        rooms.remove(booking.getRoom());
       
View Full Code Here

      // if more than our loginwaittimeout we reset logintimedoubler
      GregorianCalendar calendar = new GregorianCalendar();
      calendar.add(Calendar.MINUTE, -loginWaitTimeOut);

      if (currentFailedUsers.containsKey(userId)
          && calendar.after(currentFailedUsers.get(userId)
              .getCalendar())) {
        currentFailedUsers.remove(userId);
        if (logger.isDebugEnabled()) {
          logger.log(Level.DEBUG, "changePassword:  reset user");
        }
View Full Code Here

   *         be shown else false
   */
  public boolean showShutDownMessage() {
    GregorianCalendar calendar = new GregorianCalendar();
    calendar.add(Calendar.MINUTE, +this.getShowShutDownMessageTime());
    if (calendar.after(this.getShutDownTime())) {
      return true;
    }
    return false;
  }

View Full Code Here

            }
            //Here's the loop.
            while ( true ) {
                //logger.debug("Schedule " + counter + " Time is now " + myCal.get(Calendar.HOUR_OF_DAY) + ":" + myCal.get(Calendar.MINUTE));
                if ( outgoingServices.size() > 0 && returnServices.size() > 0 ) {
                    if ( myCal.after(outgoingServices.get(outgoingServices.size()-1).getStop(0).getStopTime()) && myCal.after(returnServices.get(returnServices.size()-1).getStop(0).getStopTime())) {
                        break;
                    }
                } else if ( outgoingServices.size() > 0 ) {
                    if ( myCal.after(outgoingServices.get(outgoingServices.size()-1).getStop(0).getStopTime()) ) {
                        break;
View Full Code Here

                if ( outgoingServices.size() > 0 && returnServices.size() > 0 ) {
                    if ( myCal.after(outgoingServices.get(outgoingServices.size()-1).getStop(0).getStopTime()) && myCal.after(returnServices.get(returnServices.size()-1).getStop(0).getStopTime())) {
                        break;
                    }
                } else if ( outgoingServices.size() > 0 ) {
                    if ( myCal.after(outgoingServices.get(outgoingServices.size()-1).getStop(0).getStopTime()) ) {
                        break;
                    }
                } else if ( returnServices.size() > 0 ) {
                    if ( myCal.after(returnServices.get(returnServices.size()-1).getStop(0).getStopTime()) ) {
                        break;
View Full Code Here

                } else if ( outgoingServices.size() > 0 ) {
                    if ( myCal.after(outgoingServices.get(outgoingServices.size()-1).getStop(0).getStopTime()) ) {
                        break;
                    }
                } else if ( returnServices.size() > 0 ) {
                    if ( myCal.after(returnServices.get(returnServices.size()-1).getStop(0).getStopTime()) ) {
                        break;
                    }
                } else {
                    break; //Both outgoing services and return services were 0 so finished.
                }
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.