added date constructor.
implements Selector<ERSEvidenceRecord>
{
private final ERSData data;
+ private final Date date;
public ERSEvidenceRecordSelector(ERSData data)
+ {
+ this(data, new Date());
+ }
+
+ public ERSEvidenceRecordSelector(ERSData data, Date atDate)
{
this.data = data;
+ this.date = new Date(atDate.getTime());
}
public ERSData getData()
@@ -23,11 +30,11 @@ public boolean match(ERSEvidenceRecord obj)
{
try
{
- if (obj.isContaining(data, new Date()))
+ if (obj.isContaining(data, date))
{
try
{
- obj.validatePresent(data, new Date());
+ obj.validatePresent(data, date);
return true;
}
