Package java.util

Examples of java.util.Calendar.before()


        }

        @Override
        public Calendar first(Calendar cal) {
            Calendar first = prepareCal(cal);
            while (first.before(cal)) {
                first.add(this.freqType, this.freqCount);
            }
            return first;
        }
View Full Code Here


        RegisterPublisher publisherInfo = requestDoc.getRegisterPublisher();
        ActiveMQTopic topic = TopicExpressionConverter.toActiveMQTopic(publisherInfo.getTopicArray());
        Calendar terminationTime = publisherInfo.getInitialTerminationTime();
        if (terminationTime != null) {
            // Termination time cannot be in the past
            if (terminationTime.before(Calendar.getInstance())) {
                // Is this the right way to fault??
                throw new NotificationException("Termination time cannot be in the past.");
            }           
            // We could fault here if the time is too far in the future.
        }
View Full Code Here

        Subscribe subscribe = requestDoc.getSubscribe();

        Calendar terminationTime = subscribe.getInitialTerminationTime();
        if (terminationTime != null) {
            // Termination time cannot be in the past
            if (terminationTime.before(Calendar.getInstance())) {
                // Is this the right way to fault??
                throw new NotificationException("Termination time cannot be in the past.");
            }           
            // We could fault here if the time is too far in the future.
        }
View Full Code Here

    int idade = today.get(Calendar.YEAR) - dateOfBirth.get(Calendar.YEAR);

    dateOfBirth.add(Calendar.YEAR, idade);

    //se a data de hoje é antes da data de Nascimento, então diminui 1(um)
    if (today.before(dateOfBirth)) {
      idade--;
    }
    return idade;
  }
 
View Full Code Here

                schedrun.set(Calendar.SECOND, getSecond());
                schedrun.set(Calendar.MINUTE, getMinute());
                schedrun.set(Calendar.HOUR_OF_DAY, getHour());
                schedrun.set(Calendar.DAY_OF_WEEK, getWeekDay());

                if (now.before(schedrun))
                {
                    // Scheduled time has NOT expired.
                    runtime = schedrun.getTime().getTime();
                }
                else
View Full Code Here

                schedrun.set(Calendar.SECOND, getSecond());
                schedrun.set(Calendar.MINUTE, getMinute());
                schedrun.set(Calendar.HOUR_OF_DAY, getHour());
                schedrun.set(Calendar.DAY_OF_MONTH, getDayOfMonth());

                if (now.before(schedrun))
                {
                    // Scheduled time has NOT expired.
                    runtime = schedrun.getTime().getTime();
                }
                else
View Full Code Here

                schedrun.set(Calendar.SECOND, getSecond());
                schedrun.set(Calendar.MINUTE, getMinute());
                schedrun.set(Calendar.HOUR_OF_DAY, getHour());

                // Scheduled time has NOT expired.
                if (now.before(schedrun))
                {
                    runtime = schedrun.getTime().getTime();
                }
                else
                {
View Full Code Here

        }

        public void run() {
            Calendar now = Calendar.getInstance();

            if (now.before(_alarm)) {
                TimerResponseChannel trc = newChannel(TimerResponseChannel.class);
                getBpelRuntimeContext().registerTimer(trc,_alarm.getTime());
                object(false,new TimerResponseChannelListener(trc){
                    private static final long serialVersionUID = 1110683632756756017L;
View Full Code Here

        }

        public void run() {
            Calendar now = Calendar.getInstance();

            if (now.before(_alarm)) {
                TimerResponseChannel trc = newChannel(TimerResponseChannel.class);
                getBpelRuntimeContext().registerTimer(trc,_alarm.getTime());
                object(false,new TimerResponseChannelListener(trc){
                    private static final long serialVersionUID = 1110683632756756017L;
View Full Code Here

                    subscription.setTopicName(topicName);

                    // check for expiration
                    Calendar current = Calendar.getInstance(); //Get current date and time
                    if (subscription.getExpires() != null) {
                        if (current.before(subscription.getExpires())) {
                            // add only valid subscriptions by checking the expiration
                            matchingSubscriptions.add(subscription);
                        }
                    } else {
                        // If a expiration dosen't exisits treat it as a never expire subscription, valid till unsubscribe
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.