com.myjavaworld.util
Class DateFilter
java.lang.Object
com.myjavaworld.util.DateFilter
- All Implemented Interfaces:
- Filter
public class DateFilter
- extends java.lang.Object
- implements Filter
- Version:
- 1.0
- Author:
- Sai Pullabhotla, psai [at] jMethods [dot] com
|
Constructor Summary |
DateFilter(java.util.Date startDate,
java.util.Date endDate)
Creates an instance of DateFilter. |
|
Method Summary |
boolean |
accept(java.lang.Object obj)
Whether or not the given object will pass through this filter. |
java.util.Date |
getEndDate()
|
java.util.Date |
getStartDate()
|
void |
setEndDate(java.util.Date endDate)
|
void |
setStartDate(java.util.Date startDate)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateFilter
public DateFilter(java.util.Date startDate,
java.util.Date endDate)
- Creates an instance of
DateFilter.
- Parameters:
startDate - endDate -
getEndDate
public java.util.Date getEndDate()
- Returns:
- Returns the endDate.
setEndDate
public void setEndDate(java.util.Date endDate)
- Parameters:
endDate - The endDate to set.
getStartDate
public java.util.Date getStartDate()
- Returns:
- Returns the startDate.
setStartDate
public void setStartDate(java.util.Date startDate)
- Parameters:
startDate - The startDate to set.
accept
public boolean accept(java.lang.Object obj)
- Description copied from interface:
Filter
- Whether or not the given object will pass through this filter.
- Specified by:
accept in interface Filter
- Parameters:
obj - The object to test.
- Returns:
true, if the object will pass through this
filter. false otherwise.