Class TimeAxisImpl

    • Constructor Detail

      • TimeAxisImpl

        public TimeAxisImpl​(String name,
                            List<org.joda.time.DateTime> axisValues)
    • Method Detail

      • wraps

        public boolean wraps()
        Description copied from interface: ReferenceableAxis
        Returns true if the values on the axis wrap around (e.g. longitude)
        Specified by:
        wraps in interface ReferenceableAxis<org.joda.time.DateTime>
      • contains

        public boolean contains​(org.joda.time.DateTime position)
        Specified by:
        contains in interface Domain<org.joda.time.DateTime>
        Overrides:
        contains in class AbstractReferenceableAxis<org.joda.time.DateTime>
        Returns:
        true if the given position is contained within this domain.
      • extendFirstValue

        protected org.joda.time.DateTime extendFirstValue​(org.joda.time.DateTime firstVal,
                                                          org.joda.time.DateTime nextVal)
        Description copied from class: AbstractReferenceableAxis
        This should return the lower bound of the first value of the axis, based on the first and second values. This will generally be equivalent to:

        firstVal - (nextVal-firstVal)/2

        Specified by:
        extendFirstValue in class AbstractReferenceableAxis<org.joda.time.DateTime>
        Parameters:
        firstVal - The first value of the axis
        nextVal - The second value of the axis
        Returns:
        The lower bound of the first axis value
      • extendLastValue

        protected org.joda.time.DateTime extendLastValue​(org.joda.time.DateTime lastVal,
                                                         org.joda.time.DateTime secondLastVal)
        Description copied from class: AbstractReferenceableAxis
        This should return the upper bound of the last value of the axis, based on the last two values. This will generally be equivalent to:

        lastVal + (lastVal-secondLastVal)/2

        Specified by:
        extendLastValue in class AbstractReferenceableAxis<org.joda.time.DateTime>
        Parameters:
        lastVal - The last value of the axis
        secondLastVal - The next-to-last value of the axis
        Returns:
        The upper bound of the the final axis value
      • difference

        protected double difference​(org.joda.time.DateTime pos1,
                                    org.joda.time.DateTime pos2)
        Description copied from class: AbstractIrregularAxis
        Returns the difference between the supplied values. This is so that certain methods can be abstracted without worrying about non-trivial difference calculation (e.g. DateTimes)
        Specified by:
        difference in class AbstractIrregularAxis<org.joda.time.DateTime>
        Parameters:
        pos1 - the first value
        pos2 - the second value
        Returns:
        the value corresponding to pos1 - pos2
      • getMidpoint

        protected org.joda.time.DateTime getMidpoint​(org.joda.time.DateTime pos1,
                                                     org.joda.time.DateTime pos2)
        Description copied from class: AbstractIrregularAxis
        Returns the midpoint of the supplied values. This is so that certain methods can be abstracted without worrying about non-trivial midpoint calculation (e.g. DateTimes)
        Specified by:
        getMidpoint in class AbstractIrregularAxis<org.joda.time.DateTime>
        Parameters:
        pos1 - the first value
        pos2 - the second value
        Returns:
        the midpoint of the values
      • getCoordinateBounds

        public Extent<org.joda.time.DateTime> getCoordinateBounds​(int index)
        Description copied from interface: ReferenceableAxis
        Gets the coordinate bounds associated with the point at the given index. In some types of ReferenceableAxis, each point along the axis is associated with a range of positions, rather than a single infinitesimal position. This method returns this range.
        Specified by:
        getCoordinateBounds in interface ReferenceableAxis<org.joda.time.DateTime>
        Overrides:
        getCoordinateBounds in class AbstractIrregularAxis<org.joda.time.DateTime>
        Returns:
        the coordinate bounds associated with the point at the given index. Returns an Extent with low=high if the bounds are infinitesimal. Never returns null.