com.esri.core.map
Class TimeExtent

java.lang.Object
  extended by com.esri.core.map.TimeExtent

public class TimeExtent
extends Object

This class can be used to define either a single date/time or a range of dates/times. It is intended to be used with time aware layers when setting the date/time ranges to display.

Since:
10.1.1

Constructor Summary
TimeExtent(Calendar date)
          Instantiates a new time extent for a single date/time.
TimeExtent(Calendar startDate, Calendar endDate)
          Instantiates a new time extent for a range of dates/times.
 
Method Summary
 boolean equals(Object obj)
           
 Calendar getEndDate()
          Gets the end date.
 Calendar getStartDate()
          Gets the start date.
 int hashCode()
           
 boolean intersects(Calendar date)
          Used to indicate whether or nto the given date falls within the range defined by this class.
 boolean intersects(TimeExtent timeExtent)
          Used to indicate whether or not the given time extent intersects this one.
 TimeExtent offset(int years, int months, int days)
          Create a new TimeExtent instance offset from this one by the given years, months and days.
 TimeExtent offset(int hours, int minutes, int seconds, int milliseconds)
          Create a new TimeExtent instance offset from this one by the given hours, minutes and seconds.
 TimeExtent offset(int years, int months, int days, int hours, int minutes, int seconds, int milliseconds)
          Create a new TimeExtent instance offset from this one by the given years, months, days, hours, minutes, seconds and milliseconds.
 void setEndDate(Calendar endDate)
          Sets the end date.
 void setStartDate(Calendar startDate)
          Sets the start date.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeExtent

public TimeExtent(Calendar date)
Instantiates a new time extent for a single date/time.

Parameters:
date - the date
Since:
10.1.1

TimeExtent

public TimeExtent(Calendar startDate,
                  Calendar endDate)
Instantiates a new time extent for a range of dates/times.

Parameters:
startDate - the start date
endDate - the end date
Since:
10.1.1
Method Detail

getStartDate

public Calendar getStartDate()
Gets the start date.

Returns:
the start date
Since:
10.1.1

setStartDate

public void setStartDate(Calendar startDate)
Sets the start date.

Parameters:
startDate - the new start date
Since:
10.1.1

getEndDate

public Calendar getEndDate()
Gets the end date.

Returns:
the end date
Since:
10.1.1

setEndDate

public void setEndDate(Calendar endDate)
Sets the end date.

Parameters:
endDate - the new end date
Since:
10.1.1

intersects

public boolean intersects(Calendar date)
Used to indicate whether or nto the given date falls within the range defined by this class.

Parameters:
date - the date
Returns:
true, if date falls within the range, false otherwise
Since:
10.1.1

intersects

public boolean intersects(TimeExtent timeExtent)
Used to indicate whether or not the given time extent intersects this one.

Parameters:
timeExtent - the time extent to intersect with
Returns:
true, if timeExtent falls within the range, false otherwise
Since:
10.1.1

offset

public TimeExtent offset(int years,
                         int months,
                         int days)
Create a new TimeExtent instance offset from this one by the given years, months and days.

Parameters:
years - the years
months - the months
days - the days
Returns:
a new time extent
Since:
10.1.1

offset

public TimeExtent offset(int hours,
                         int minutes,
                         int seconds,
                         int milliseconds)
Create a new TimeExtent instance offset from this one by the given hours, minutes and seconds.

Parameters:
hours - the hours
minutes - the minutes
seconds - the seconds
milliseconds - the milliseconds
Returns:
a new time extent
Since:
10.1.1

offset

public TimeExtent offset(int years,
                         int months,
                         int days,
                         int hours,
                         int minutes,
                         int seconds,
                         int milliseconds)
Create a new TimeExtent instance offset from this one by the given years, months, days, hours, minutes, seconds and milliseconds.

Parameters:
years - the years
months - the months
days - the days
hours - the hours
minutes - the minutes
seconds - the seconds
milliseconds - the milliseconds
Returns:
a new time extent
Since:
10.1.1

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Since:
10.1.1

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Since:
10.1.1

toString

public String toString()
Overrides:
toString in class Object
Since:
10.1.1


Copyright © 2012. All Rights Reserved.