Class TimeExtent


  • public final class TimeExtent
    extends java.lang.Object
    Represents a span of time between a start time and end time. A time extent which represents an instant in time has the start time and end time set to the same value. TimeExtent is returned in the meta-data for time-aware services and layers. It is often used to create a time slider ranging from a start time to an end time. Start and end times of the time extent can be made unbounded by using MIN_CALENDAR and MAX_CALENDAR for the start and end times e.g. TimeExtent t = new TimeExtent(MIN_CALENDAR, end) would create a time extent with unbounded start and an end time specified by end.
    Since:
    100.3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Calendar MAX_CALENDAR
      The maximum possible calendar date.
      static java.util.Calendar MIN_CALENDAR
      The minimum possible calendar date.
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeExtent​(java.util.Calendar timeInstant)
      Creates a time extent with a time instant.
      TimeExtent​(java.util.Calendar start, java.util.Calendar end)
      Creates a time extent with the given start and end times.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Calendar getEndTime()
      Gets the end time of this time extent.
      java.util.Calendar getStartTime()
      Gets the start time of this time extent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MIN_CALENDAR

        public static final java.util.Calendar MIN_CALENDAR
        The minimum possible calendar date.
        Since:
        100.3.0
      • MAX_CALENDAR

        public static final java.util.Calendar MAX_CALENDAR
        The maximum possible calendar date.
        Since:
        100.3.0
    • Constructor Detail

      • TimeExtent

        public TimeExtent​(java.util.Calendar timeInstant)
        Creates a time extent with a time instant.
        Parameters:
        timeInstant - the time instant is both the start and end time of the extent
        Throws:
        java.lang.IllegalArgumentException - if timeInstant is null
        Since:
        100.3.0
      • TimeExtent

        public TimeExtent​(java.util.Calendar start,
                          java.util.Calendar end)
        Creates a time extent with the given start and end times.
        Parameters:
        start - the start time
        end - the end time
        Throws:
        java.lang.IllegalArgumentException - if start is null
        java.lang.IllegalArgumentException - if end is null
        ArcGISRuntimeException - if the end time is before the start time
        Since:
        100.3.0
    • Method Detail

      • getEndTime

        public java.util.Calendar getEndTime()
        Gets the end time of this time extent.
        Returns:
        the end time of this TimeExtent
        Since:
        100.3.0
      • getStartTime

        public java.util.Calendar getStartTime()
        Gets the start time of this time extent.
        Returns:
        the start time of this time extent
        Since:
        100.3.0