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(TimeExtent timeExtent)
Used to indicate whether or not the given time extent intersects this one.
boolean intersects(Calendar date)
Used to indicate whether or nto the given date falls within the range defined by this class.
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()
[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 the date

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

Public Methods

public boolean equals (Object obj)

public Calendar getEndDate ()

Gets the end date.

Returns
  • the end date

public Calendar getStartDate ()

Gets the start date.

Returns
  • the start date

public int hashCode ()

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

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

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

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

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

public void setEndDate (Calendar endDate)

Sets the end date.

Parameters
endDate the new end date

public void setStartDate (Calendar startDate)

Sets the start date.

Parameters
startDate the new start date

public String toString ()