Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util
Class AbsoluteDateRange

java.lang.Object
  extended by com.jivesoftware.util.AbsoluteDateRange
All Implemented Interfaces:
DateRange

public class AbsoluteDateRange
extends java.lang.Object
implements DateRange

Represents a date range between two fixed instances in time.


Constructor Summary
AbsoluteDateRange(java.util.Date startDate, java.util.Date endDate)
          Creates a representation of an absolute date range based on startDate and endDate.
 
Method Summary
 java.lang.String getDisplayName()
          Returns a string representing a human-readable descriptive name of this date range.
 java.util.Date getEndDate(java.util.Date date, javax.servlet.http.HttpServletRequest request, User user)
          Returns the end date passed into the constructor.
 java.util.Date getStartDate(java.util.Date date, javax.servlet.http.HttpServletRequest request, User user)
          Returns the start date passed into the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsoluteDateRange

public AbsoluteDateRange(java.util.Date startDate,
                         java.util.Date endDate)
Creates a representation of an absolute date range based on startDate and endDate.

Parameters:
startDate - the starting date of this date range.
endDate - the ending date of this date range.
Method Detail

getDisplayName

public java.lang.String getDisplayName()
Description copied from interface: DateRange
Returns a string representing a human-readable descriptive name of this date range.

Specified by:
getDisplayName in interface DateRange
Returns:
a descriptive name of this date range.

getStartDate

public java.util.Date getStartDate(java.util.Date date,
                                   javax.servlet.http.HttpServletRequest request,
                                   User user)
Returns the start date passed into the constructor. The specified date is ignored and can be null since it is not relevant to an absolute date.

Specified by:
getStartDate in interface DateRange
Parameters:
date - the date to base a date range calculation on. Most often, this will be the current instance in time.
request - the request object that may have locale information in it.
user - the User to use in determining locale
Returns:
the starting date of this date range.

getEndDate

public java.util.Date getEndDate(java.util.Date date,
                                 javax.servlet.http.HttpServletRequest request,
                                 User user)
Returns the end date passed into the constructor. The specified date is ignored and can be null since it is not relevant to an absolute date.

Specified by:
getEndDate in interface DateRange
Parameters:
date - the date to base a date range calculation on. Most often, this will be the current instance in time.
request - the request object that may have locale information in it.
user - the User to use in determining locale
Returns:
the ending date of this date range.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.