org.entityfs.util.filter.entity
Class EntityRecentModificationFilter
java.lang.Object
org.entityfs.support.filter.AbstractConvenientFilter<EntityView>
org.entityfs.util.filter.entity.EntityRecentModificationFilter
- All Implemented Interfaces:
- Cloneable, EntityFilter, ConvenientFilter<EntityView>, Filter<EntityView>
public class EntityRecentModificationFilter
- extends AbstractConvenientFilter<EntityView>
- implements EntityFilter
Match entities that was modified recently. (Negate this filter to match
entities that was not modified recently.) How recently an entity has to be
modified for the filter to match it is configurable.
Instances of this class are immutable.
- Since:
- 1.0
- Author:
- Karl Gustafsson
EntityRecentModificationFilter
public EntityRecentModificationFilter(long time,
TimeUnit unit)
- Create the filter.
- Parameters:
time
- The maximum time since the entity was last modified.unit
- The unit of the time argument.
matches
public boolean matches(EntityView ev)
- Description copied from interface:
Filter
- Does the filter match the object?
- Specified by:
matches
in interface Filter<EntityView>
- Parameters:
ev
- The object to match.
- Returns:
true
if the filter matches the object.
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object