org.entityfs.util.filter.entity
Class ParentFilter
java.lang.Object
org.entityfs.support.filter.AbstractConvenientFilter<EntityView>
org.entityfs.util.filter.entity.ParentFilter
- All Implemented Interfaces:
- Cloneable, EntityFilter, ConvenientFilter<EntityView>, Filter<EntityView>
public class ParentFilter
- extends AbstractConvenientFilter<EntityView>
- implements EntityFilter
This filter takes another Filter and runs it on the entity's parent
directory instead of on the entity itself.
If the entity does not have any parent directory (i.e. is the root
directory), the matches method returns false.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
SuperParentAndFilter,
SuperParentOrFilter- In_jar:
- entityfs-util
ParentFilter
public ParentFilter(Filter<EntityView> f)
- Create a filter that investigates parent directories.
- Parameters:
f - The filter to apply to the entity's parent.
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