Examples of before()


Examples of java.util.Date.before()

                for (Iterator i = addresses.iterator(); i.hasNext();) {
                    String ipPort = (String) i.next();

                    Date lastHeartBeat = (Date) this.clusterAddresses
                            .get(ipPort);
                    if (lastHeartBeat.before(noHeartbeatDate)) {
                        this.clusterAddresses.remove(ipPort);
                        Logger.log(Logger.FULL_DEBUG, CLUSTER_RESOURCES,
                                "SimpleCluster.RemovingNode", ipPort);
                    }
View Full Code Here

Examples of java.util.Date.before()

    protected DataIterator makeDataIterator(StationObsDataset sobs) {
      Date start = sobs.getStartDate();
      if (start.after(want_end))
        return null;
      Date end = sobs.getEndDate();
      if (end.before(want_start))
        return null;
      ucar.unidata.geoloc.Station s = sobs.getStation(stationName);
      if (s == null) return null;
      return sobs.getDataIterator(s, start, end);
    }
View Full Code Here

Examples of java.util.Date.before()

    assertTrue(isOkay);

    f1 = folderDao.getFolder(f1.getId());
    assertEquals("important data", f1.getDescription());
    assertEquals("my new folder1 name", f1.getName());
    assertTrue(before.before(f1.getLastUpdated()));
  }

  public void testPageBookmarks() throws Exception {
    DaoResult<Bookmark> result = folderDao.pageBookmarks(new Folder(1), 0,
        10);
View Full Code Here

Examples of java.util.Date.before()

        String nonce = _nonceGenerator.next();

        Date nonceDate = _dateFormat.parse(nonce);

        assertNotNull(nonceDate);
        assertTrue(nonceDate.before(new Date()));
    }

    public static Test suite()
    {
        return new TestSuite(AbstractNonceGeneratorTest.class);
View Full Code Here

Examples of java.util.Date.before()

                // complete(), which will recalculate the fields.  Since we can't access
                // the fields[] array in Calendar, we clone the entire object.  This will
                // stop working if Calendar.clone() is ever rewritten to call complete().
                Calendar savedCalendar = (Calendar)calendar.clone();
                parsedDate = calendar.getTime();
                if (parsedDate.before(defaultCenturyStart))
                {
                    // We can't use add here because that does a complete() first.
                    savedCalendar.set(Calendar.YEAR, defaultCenturyStartYear + 100);
                    parsedDate = savedCalendar.getTime();
                }
View Full Code Here

Examples of java.util.Date.before()

  public static boolean isExpired(TemporalActiveEntity entity) {
    Date now = new Date();
    if (null == entity.getEffectiveAt()) return true;
    return entity.getEffectiveAt().after(now)
        || (null != entity.getInvalidAt() && !now.before(entity.getInvalidAt()));
  }

}
View Full Code Here

Examples of java.util.Date.before()

public class CalendarTest {

  public void  testRoll(){
    Calendar calendar= Calendar.getInstance();
    Date ajusted= DateUtils.rollMinutes(calendar.getTime(),-30);
    assertTrue(ajusted.before(calendar.getTime()));
  }
}
View Full Code Here

Examples of java.util.Date.before()

        Delay res = Delay.getDelay(Delay.NONE);
        int completionPercentage = t.getCompletionPercentage();
        if (t.isMilestone() || completionPercentage == 100)
            return res;
        Date endDate = t.getEnd().getTime();
        if (endDate.before(myToday))
            if (t.isCritical())
                res.setType(Delay.CRITICAL);
            else
                res.setType(Delay.NORMAL);
        return res;
View Full Code Here

Examples of java.util.Date.before()

      int length = 0;
      while(true) {
        ChartModelBase.Offset[] offsets = getChartModel().calculateOffsets(myCurrentTimeFrame, myCurrentUnit, offsetDate, getChartModel().getTimeUnitStack().getDefaultTimeUnit(), getChartModel().getBottomUnitWidth());
        assert offsets.length>0;
        Date lastOffsetEnd = offsets[offsets.length-1].getOffsetEnd();
        if (lastOffsetEnd.before(anchorDate)) {
          offsetDate = lastOffsetEnd;
          length += offsets[offsets.length-1].getOffsetPixels();
          continue;
        }
      for (int i=offsets.length-1; i>=0; i--) {
View Full Code Here

Examples of java.util.Date.before()

            if (offsets.length==0) {
                throw new IllegalStateException("Failed to calculate offsets for anchorDate="+anchorDate);
            }
            Date lastOffsetEnd = offsets[offsets.length-1].getOffsetEnd();
            //System.err.println("[TaskRendererImpl] getPositiveOffset(): |offsets|="+offsets.length+" last offset end="+lastOffsetEnd+" last offset pixels="+offsets[offsets.length-1].getOffsetPixels());
            if (lastOffsetEnd.before(offsetDate)) {
                anchorDate = lastOffsetEnd;
                length += offsets[offsets.length-1].getOffsetPixels();
                continue;
            }
            //int firstOffsetPixels = offsets[0].getOffsetPixels();
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.