Package java.util

Examples of java.util.Date.compareTo()


            if( extractor.isNullValue( workingMemory, object1 ) ) {
                return false;
            }
            final Date value1 = (Date) extractor.getValue( workingMemory, object1 );
            final Object value2 = object2.getValue();
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) >= 0;
        }

        public boolean evaluateCachedRight(InternalWorkingMemory workingMemory,
                                           final VariableContextEntry context, final Object left) {
            if( context.rightNull ) {
View Full Code Here


                return value2 == null;
            }
            if ( value2 == null ) {
                return false;
            }
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) == 0;
        }

        public boolean evaluateCachedRight(InternalWorkingMemory workingMemory,
                                           final VariableContextEntry context, final Object left) {
            final Date value1 = (Date) context.declaration.getExtractor().getValue( workingMemory, left );
View Full Code Here

                return value2 == null;
            }
            if ( value2 == null ) {
                return false;
            }
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) == 0;
        }

        public boolean evaluateCachedLeft(InternalWorkingMemory workingMemory,
                                          final VariableContextEntry context, final Object right) {
            final Date value1 = (Date) ((ObjectVariableContextEntry) context).left;
View Full Code Here

                return value2 == null;
            }
            if ( value2 == null ) {
                return false;
            }
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) == 0;
        }

        public boolean evaluate(InternalWorkingMemory workingMemory,
                                final InternalReadAccessor extractor1,
                                final Object object1,
View Full Code Here

                return value2 != null;
            }
            if ( value2 == null ) {
                return true;
            }
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) != 0;
        }

        public boolean evaluateCachedRight(InternalWorkingMemory workingMemory,
                                           final VariableContextEntry context, final Object left) {
            final Date value1 = (Date) context.declaration.getExtractor().getValue( workingMemory, left );
View Full Code Here

                return value2 != null;
            }
            if ( value2 == null ) {
                return true;
            }
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) != 0;
        }

        public boolean evaluateCachedLeft(InternalWorkingMemory workingMemory,
                                          final VariableContextEntry context, final Object right) {
            final Date value1 = (Date) ((ObjectVariableContextEntry) context).left;
View Full Code Here

                return value2 != null;
            }
            if ( value2 == null ) {
                return true;
            }
            return value1.compareTo( DateUtils.getRightDate( value2 ) ) != 0;
        }

        public boolean evaluate(InternalWorkingMemory workingMemory,
                                final InternalReadAccessor extractor1,
                                final Object object1,
View Full Code Here

      for(BNLogin rsSubject : rsSubjectAccount.getBnLogins()) {
        if(lastSeen == null)
          lastSeen = rsSubject.getLastSeen();
        else {
          Date nt = rsSubject.getLastSeen();
          if((nt != null) && (nt.compareTo(lastSeen) > 0))
            lastSeen = nt;
        }
      }

      if(lastSeen != null) {
View Full Code Here

        throw new NeverSeenUserException(bnSubject);
    } else {
      for(BNLogin login : rsSubjectAccount.getBnLogins()) {
        Date nt = login.getLastSeen();
        if((rsSubject == null)
        || ((nt != null) && (nt.compareTo(rsSubject.getLastSeen()) > 0)))
          rsSubject = login;
      }
      if(rsSubject == null)
        throw new NeverSeenUserException(rsSubjectAccount);
    }
View Full Code Here

            date = dateFormat.parse(currentDate);
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }

        int c1 = date.compareTo(date1);
        int c2 = date.compareTo(date2);


        return (c1 >= 0 && c2 <= 0);
    }
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.