congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CalendarDate.equals
Code IndexAdd Tabnine to your IDE (free)

How to use
equals
method
in
ucar.nc2.time.CalendarDate

Best Java code snippets using ucar.nc2.time.CalendarDate.equals (Showing top 20 results out of 315)

origin: edu.ucar/netcdf

public boolean isPoint() {
 return start.equals(end);
}
origin: edu.ucar/cdm

public boolean isPoint() {
 return start.equals(end);
}
origin: Unidata/thredds

public boolean isPoint() {
 return start.equals(end);
}
origin: Unidata/thredds

@Override
public boolean equals(Object o) {
 if (this == o) return true;
 if (o == null || getClass() != o.getClass()) return false;
 TinvDate tinvDate = (TinvDate) o;
 if (end != null ? !end.equals(tinvDate.end) : tinvDate.end != null) return false;
 if (start != null ? !start.equals(tinvDate.start) : tinvDate.start != null) return false;
 return true;
}
origin: Unidata/thredds

@Override
public boolean equals(Object o) {
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 CalendarDateRange that = (CalendarDateRange) o;
 // All other fields in this class are derived from start or end.
 return start.equals(that.start) && end.equals(that.end);
}
origin: Unidata/thredds

@Override
public ProfileFeature getProfileByDate(CalendarDate date) throws IOException {
 for (ProfileFeature pf : this) {
  if (pf.getTime().equals(date)) return pf;
 }
 return null;
}
origin: edu.ucar/netcdf

public int findRunIndex(CalendarDate want) {
 for (int i=0; i<runOffset.length; i++)
  if (want.equals(FmrcInv.makeOffsetDate(base, runOffset[i])))
   return i;
 return -1;
}
origin: edu.ucar/cdm

public int findRunIndex(CalendarDate want) {
 for (int i=0; i<runOffset.length; i++)
  if (want.equals(FmrcInv.makeOffsetDate(base, runOffset[i])))
   return i;
 return -1;
}
origin: Unidata/thredds

public int findRunIndex(CalendarDate want) {
 for (int i=0; i<runOffset.length; i++)
  if (want.equals(FmrcInv.makeOffsetDate(base, runOffset[i])))
   return i;
 return -1;
}
origin: Unidata/thredds

/**
 * See if the given CalendarDate appears as a coordinate
 *
 * @param date test this
 * @return true if equals a coordinate
 */
public boolean hasCalendarDate(CalendarDate date) {
 List<CalendarDate> cdates = getCalendarDates();
 for (CalendarDate cd : cdates) {   // LOOK linear search, switch to binary
  if (date.equals(cd))
   return true;
 }
 return false;
}
origin: edu.ucar/cdm

/**
 * See if the given CalendarDate appears as a coordinate
 *
 * @param date test this
 * @return true if equals a coordinate
 */
public boolean hasCalendarDate(CalendarDate date) {
 List<CalendarDate> cdates = getCalendarDates();
 for (CalendarDate cd : cdates) {   // LOOK linear search, switch to binary
  if (date.equals(cd))
   return true;
 }
 return false;
}
origin: edu.ucar/netcdf

/**
 * See if the given CalendarDate appears as a coordinate
 *
 * @param date test this
 * @return true if equals a coordinate
 */
public boolean hasCalendarDate(CalendarDate date) {
 List<CalendarDate> cdates = getCalendarDates();
 for (CalendarDate cd : cdates) {
  if (date.equals(cd))
   return true;
 }
 return false;
}
origin: edu.ucar/netcdf

ConstantForecastDataset(CalendarDate time) throws FileNotFoundException {
 this.offset = FmrcInv.getOffsetInHours(base, time);
 for (CalendarDate d : getForecastDates())
  if (d.equals(time))
   return; // ok
 throw new FileNotFoundException("No forecast date of " + time);  // we dont got it
}
origin: edu.ucar/cdm

ConstantForecastDataset(CalendarDate time) throws FileNotFoundException {
 this.offset = FmrcInv.getOffsetInHours(base, time);
 for (CalendarDate d : getForecastDates())
  if (d.equals(time))
   return; // ok
 throw new FileNotFoundException("No forecast date of " + time);  // we dont got it
}
origin: Unidata/thredds

ConstantForecastDataset(CalendarDate time) throws FileNotFoundException {
 this.offset = FmrcInv.getOffsetInHours(base, time);
 for (CalendarDate d : getForecastDates())
  if (d.equals(time))
   return; // ok
 throw new FileNotFoundException("No forecast date of " + time);  // we dont got it
}
origin: Unidata/thredds

public int getOffset(CalendarDate start, CalendarDate end) {
 if (start.equals(end)) return 0;
 long start_millis = start.getDateTime().getMillis();
 long end_millis = end.getDateTime().getMillis();
 // 5 second slop
 Period p;
 if (start_millis < end_millis)
  p = new Period(start_millis, end_millis + 5000, getPeriodType());
 else
  p = new Period(start_millis+5000, end_millis, getPeriodType());
 return p.get(getDurationFieldType());
}
origin: Unidata/thredds

public double makeOffsetFromRefDate( CalendarDate date) {
 if (isCalendarField) {
  if (date.equals(baseDate)) return 0.0;
  return date.getDifference(baseDate, periodField);
 } else {
  long msecs = date.getDifferenceInMsecs(baseDate);
  return msecs / period.getValueInMillisecs();
 }
}
origin: Unidata/thredds

@Test
public void FmrcForecastDates() {
 try {
  List<CalendarDate> scanForecastTimes = fmrcScan.getForecastDates();
  List<CalendarDate> explicitForecastTimes = fmrcExplicit.getForecastDates();
  Assert.assertEquals(scanForecastTimes.size(), scanForecastTimes.size());
  Assert.assertEquals(explicitForecastTimes.size(), 24);
  for (int i = 0; i < scanForecastTimes.size(); i++) {
   Assert.assertTrue(scanForecastTimes.get(i).equals(explicitForecastTimes.get(i)));
  }
 } catch (IOException e) {
  e.printStackTrace();
 }
}
origin: Unidata/thredds

@Test
public void FmrcRunDates() {
 try {
  List<CalendarDate> scanRunTimes = fmrcScan.getRunDates();
  List<CalendarDate> explicitRunTimes = fmrcExplicit.getRunDates();
  Assert.assertEquals(scanRunTimes.size(), 3);
  Assert.assertEquals(explicitRunTimes.size(), scanRunTimes.size());
  for (int i = 0; i < scanRunTimes.size(); i++) {
   Assert.assertTrue(explicitRunTimes.get(i).equals(scanRunTimes.get(i)));
  }
 } catch (IOException e) {
  e.printStackTrace();
 }
}
origin: Unidata/thredds

static private void checkPointFeature(PointFeature pobs, CalendarDateUnit timeUnit) throws java.io.IOException {
 Assert.assertNotNull("PointFeature location", pobs.getLocation());
 Assert.assertNotNull("PointFeature time", pobs.getNominalTimeAsCalendarDate());
 Assert.assertNotNull("PointFeature dataAll", pobs.getDataAll());
 Assert.assertNotNull("PointFeature featureData", pobs.getFeatureData());
 Assert.assertEquals("PointFeature makeCalendarDate", timeUnit.makeCalendarDate(pobs.getObservationTime()), pobs.getObservationTimeAsCalendarDate());
 assert timeUnit.makeCalendarDate(pobs.getObservationTime()).equals(pobs.getObservationTimeAsCalendarDate());
 checkData( pobs.getDataAll());
}
ucar.nc2.timeCalendarDateequals

Popular methods of CalendarDate

  • getMillis
    Gets the milliseconds of the datetime instant from the Java epoch of 1970-01-01T00:00:00Z.
  • of
  • toString
    ISO formatted string
  • parseISOformat
    Get CalendarDate from ISO date string
  • add
  • getDifferenceInMsecs
    Get difference between two calendar dates in millisecs
  • isAfter
  • getCalendar
  • isBefore
  • toDate
    Get the equivilent java.util.Date
  • compareTo
  • getDateTime
  • compareTo,
  • getDateTime,
  • getHourOfDay,
  • parseUdunits,
  • present,
  • withDoy,
  • <init>,
  • getDifference,
  • getFieldValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • Permission (java.security)
    Legacy security code; do not use.
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ImageIO (javax.imageio)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now