/** * Is this date before the given date. if isPresent, always false. * * @param d test against this date * @return true if this date before the given date */ public boolean before(Date d) { if (isPresent()) return false; return date.isBefore(CalendarDate.of(d)); }
/** * Is this date before the given date. if isPresent, always false. * * @param d test against this date * @return true if this date before the given date */ public boolean before(Date d) { if (isPresent()) return false; return date.isBefore(CalendarDate.of(d)); }
/** * Is this date before the given date. if isPresent, always false. * * @param d test against this date * @return true if this date before the given date */ public boolean before(Date d) { if (isPresent()) return false; return date.isBefore(CalendarDate.of(d)); }
/** * Is this date before the given date. if d.isPresent, always true, else if this.isPresent, false. * * @param d test against this date * @return true if this date before the given date */ public boolean before(DateType d) { if (d.isPresent()) return true; if (isPresent()) return false; return date.isBefore(d.getCalendarDate()); }
protected void trackBB(LatLonPoint loc, CalendarDate obsDate) { if (loc != null) { if (llbb == null) { llbb = new LatLonRect(loc, .001, .001); return; } llbb.extend(loc); } // date is handled specially if ((minDate == null) || minDate.isAfter(obsDate)) minDate = obsDate; if ((maxDate == null) || maxDate.isBefore(obsDate)) maxDate = obsDate; }
/** * Is this date before the given date. if d.isPresent, always true, else if this.isPresent, false. * * @param d test against this date * @return true if this date before the given date */ public boolean before(DateType d) { if (d.isPresent()) return true; if (isPresent()) return false; return date.isBefore(d.getCalendarDate()); }
protected void trackBB(LatLonPoint loc, CalendarDate obsDate) { if (loc != null) { if (llbb == null) { llbb = new LatLonRect(loc, .001, .001); return; } llbb.extend(loc); } // date is handled specially if ((minDate == null) || minDate.isAfter(obsDate)) minDate = obsDate; if ((maxDate == null) || maxDate.isBefore(obsDate)) maxDate = obsDate; }
/** * Is this date before the given date. if d.isPresent, always true, else if this.isPresent, false. * * @param d test against this date * @return true if this date before the given date */ public boolean before(DateType d) { if (d.isPresent()) return true; if (isPresent()) return false; return date.isBefore(d.getCalendarDate()); }
protected void trackBB(EarthLocation loc, CalendarDate obsDate) { if (loc != null) { if (llbb == null) { llbb = new LatLonRect(loc.getLatLon(), .001, .001); return; } llbb.extend(loc.getLatLon()); } // date is handled specially if ((minDate == null) || minDate.isAfter(obsDate)) minDate = obsDate; if ((maxDate == null) || maxDate.isBefore(obsDate)) maxDate = obsDate; }
private void testAllMethods(String location) throws IOException { Formatter errlog = new Formatter(); RadialDatasetSweep rds = (RadialDatasetSweep) FeatureDatasetFactoryManager.open(FeatureType.RADIAL, location, null, errlog); System.out.println(location+"-----------"); rds.getDetailInfo(errlog); if (show) System.out.println(errlog); CalendarDate d1 = rds.getCalendarDateStart(); CalendarDate d2 = rds.getCalendarDateEnd(); if ((d1 != null) && (d2 != null)) assert d1.isBefore(d2) || d1.equals( d2); ucar.unidata.geoloc.EarthLocation eloc = rds.getCommonOrigin(); assert eloc != null; LatLonPoint llp = new LatLonPointImpl( eloc.getLatitude(), eloc.getLongitude()); LatLonRect bb = rds.getBoundingBox(); assert bb.contains(llp); List rvars = rds.getDataVariables(); assert null != rvars; assert 0 < rvars.size(); for (int i = 0; i < rvars.size(); i++) { RadialDatasetSweep.RadialVariable rv = (RadialDatasetSweep.RadialVariable) rvars.get(i); testRadialVariable( rv); } }
CalendarDate d2 = fdataset.getCalendarDateEnd(); if ((d1 != null) && (d2 != null)) Assert.assertTrue("calendar date min <= max", d1.isBefore(d2) || d1.equals(d2));
Assert.assertTrue(edge2+"<"+time_val, !edge2.isBefore(time_val));
Assert.assertTrue(edge2.toString(), !edge2.isBefore(time_val));
if (wantTimeOffset != null) { Assert.assertTrue("time coord lower", !tinv.getStart().isAfter(wantTimeOffset)); // lower <= time Assert.assertTrue("time coord upper", !tinv.getEnd().isBefore(wantTimeOffset));// upper >= time
Assert.assertTrue("time coord lower", !lower.isAfter(time)); // lower <= time CalendarDate upper = timeAxis1D.makeDate(timeAxis1D.getCoordEdge2(0)); Assert.assertTrue("time coord lower", !upper.isBefore(time)); // upper >= time
Assert.assertTrue("time coord lower", !lower.isAfter(time)); // lower <= time CalendarDate upper = timeAxis1D.makeDate(timeAxis1D.getCoordEdge2(0)); Assert.assertTrue("time coord lower", !upper.isBefore(time)); // upper >= time } else { Assert.assertEquals("time coord", time, timeAxis1D.makeDate(timeAxis1D.getCoordMidpoint(0)));