com.ibm.geolib.st

Class TimeInterval

  • java.lang.Object
    • com.ibm.geolib.st.TimeInterval


  • public class TimeInterval
    extends java.lang.Object
    Represents a time interval (from start time to end time) - used by some spatio-temporal functions
    • Constructor Summary

      Constructors 
      Constructor and Description
      TimeInterval(java.time.ZonedDateTime start, java.time.ZonedDateTime end) 
    • Constructor Detail

      • TimeInterval

        public TimeInterval(java.time.ZonedDateTime start,
                    java.time.ZonedDateTime end)
        Parameters:
        start - the start time of the interval
        end - the end time of the interval
    • Method Detail

      • getDuration

        public java.time.Duration getDuration()
        Returns:
        the duration of this
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getStartTime

        public java.time.ZonedDateTime getStartTime()
        Returns:
        the start time
      • getEndTime

        public java.time.ZonedDateTime getEndTime()
        Returns:
        the end time
      • duration

        public java.time.Duration duration()
        Returns:
        the duration between the start and end time
      • contains

        public boolean contains(java.time.ZonedDateTime dateTime)
        Parameters:
        dateTime -
        Returns:
        whether dateTime is within the time interval
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object

© Copyright IBM 2017