Class CoordinateAxis1DTime

    • Method Detail

      • getCalendarDate

        public CalendarDate getCalendarDate​(int idx)
        Get the the ith CalendarDate.
        Parameters:
        idx - index
        Returns:
        the ith CalendarDate
      • getCalendarDateRange

        public CalendarDateRange getCalendarDateRange()
        Get calendar date range
        Returns:
        calendar date range
      • getNames

        public List<ucar.nc2.util.NamedObject> getNames()
      • getTimeResolution

        public TimeUnit getTimeResolution()
                                   throws Exception
        only if isRegular() LOOK REDO
        Returns:
        time unit
        Throws:
        Exception - on bad unit string
      • findTimeIndexFromCalendarDate

        public int findTimeIndexFromCalendarDate​(CalendarDate d)
        Given a Date, find the corresponding time index on the time coordinate axis. Can only call this is hasDate() is true. This will return
        • i, if time(i) <= d < time(i+1).
        • 0, if d < time(0)
        • n-1, if d > time(n-1), where n is length of time coordinates
        Parameters:
        d - date to look for
        Returns:
        corresponding time index on the time coordinate axis
        Throws:
        UnsupportedOperationException - is no time axis or isDate() false
      • hasCalendarDate

        public boolean hasCalendarDate​(CalendarDate date)
        See if the given CalendarDate appears as a coordinate
        Parameters:
        date - test this
        Returns:
        true if equals a coordinate
      • getCalendarDates

        public List<CalendarDate> getCalendarDates()
        Get the list of datetimes in this coordinate as CalendarDate objects.
        Returns:
        list of CalendarDates.
      • getCoordBoundsDate

        public CalendarDate[] getCoordBoundsDate​(int i)
      • getCoordBoundsMidpointDate

        public CalendarDate getCoordBoundsMidpointDate​(int i)
      • builder

        public static CoordinateAxis1DTime.Builder<?> builder()
        Get Builder for this class that allows subclassing.
        See Also:
        "https://community.oracle.com/blogs/emcmanus/2010/10/24/using-builder-pattern-subclasses"