public class

TimeExtent

extends Object
java.lang.Object
   ↳ com.esri.core.map.TimeExtent

Class Overview

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.

Summary

Public Constructors
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.
Public Methods
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 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.
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.
void setEndDate(Calendar endDate)
Sets the end date.
void setStartDate(Calendar startDate)
Sets the start date.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TimeExtent (Calendar date)

Instantiates a new time extent for a single date/time.

Parameters
date Calendar: the date

public TimeExtent (Calendar startDate, Calendar endDate)

Instantiates a new time extent for a range of dates/times.

Parameters
startDate Calendar: the start date
endDate Calendar: the end date

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public Calendar getEndDate ()

Gets the end date.

Returns
Calendar the end date

public Calendar getStartDate ()

Gets the start date.

Returns
Calendar the start date

public int hashCode ()

Returns
int

public boolean intersects (Calendar date)

Used to indicate whether or nto the given date falls within the range defined by this class.

Parameters
date Calendar: the date
Returns
boolean true, if date falls within the range, false otherwise

public boolean intersects (TimeExtent timeExtent)

Used to indicate whether or not the given time extent intersects this one.

Parameters
timeExtent TimeExtent: the time extent to intersect with
Returns
boolean true, if timeExtent falls within the range, false otherwise

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 int: the years
months int: the months
days int: the days
Returns
TimeExtent a new time extent

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 int: the years
months int: the months
days int: the days
hours int: the hours
minutes int: the minutes
seconds int: the seconds
milliseconds int: the milliseconds
Returns
TimeExtent a new time extent

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 int: the hours
minutes int: the minutes
seconds int: the seconds
milliseconds int: the milliseconds
Returns
TimeExtent a new time extent

public void setEndDate (Calendar endDate)

Sets the end date.

Parameters
endDate Calendar: the new end date

public void setStartDate (Calendar startDate)

Sets the start date.

Parameters
startDate Calendar: the new start date

public String toString ()

Returns
String