org.entityfs.support.filter
Interface ConvenientFilter<T>

All Superinterfaces:
Cloneable, Filter<T>
All Known Implementing Classes:
AbstractConvenientFilter, AndFilter, DirectoryAEF, DirectoryContainsFilter, DirectoryEmptyFilter, DirectoryETAF, DirectoryFilter, EFileFilter, EFileNameExtensionFilter, EntityIdentityFilter, EntityLatestModificationTimeFilter, EntityLocationGlobFilter, EntityLocationRegexpFilter, EntityNameFilter, EntityNameGlobFilter, EntityNamePrefixFilter, EntityNameRegexpFilter, EntityRecentModificationFilter, EntityTypeETAF, EntityTypeFilter, FalseAEF, FalseEntityFilter, FalseETAF, FalseFilter, FalseProjectFilter, FGrepFilter, FileAEF, FileETAF, FilterToConvenientFilterAdapter, GrepFilter, JavaProjectFilter, LockedEntityFilter, NameETAF, NameGlobAEF, NameGlobETAF, NotFilter, OrFilter, ParentFilter, ProjectNameFilter, ProjectNameGlobFilter, ProjectNameInCollectionFilter, ProjectNameRegexpFilter, ProjectTypeFilter, ReadLockedEntityFilter, SuperParentAndFilter, SuperParentOrFilter, TarDirectoryEntryFilter, TarEntryNameFilter, TarEntryNameGlobFilter, TarFileEntryFilter, TrueAEF, TrueEntityFilter, TrueETAF, TrueFilter, TrueProjectFilter, WriteLockedEntityFilter, XorFilter

public interface ConvenientFilter<T>
extends Filter<T>

This interface adds a few convenience methods for combining different filters.

Since:
1.1
Author:
Karl Gustafsson

Method Summary
 ConvenientFilter<T> and(Filter<? super T> filter)
          Combines the two filters using the logical AND operation and returns the combined filter.
 ConvenientFilter<T> not()
          Creates a filter that negates the result from this filter.
 ConvenientFilter<T> or(Filter<? super T> filter)
          Combines the two filters using the logical OR operation and returns the combined filter.
 ConvenientFilter<T> xor(Filter<? super T> filter)
          Combines the two filters using the logical XOR operation and returns the combined filter.
 
Methods inherited from interface org.entityfs.support.filter.Filter
matches
 

Method Detail

and

ConvenientFilter<T> and(Filter<? super T> filter)
Combines the two filters using the logical AND operation and returns the combined filter.

Parameters:
filter - The filter to combine this filter with.
Returns:
The combined filter.

or

ConvenientFilter<T> or(Filter<? super T> filter)
Combines the two filters using the logical OR operation and returns the combined filter.

Parameters:
filter - The filter to combine this filter with.
Returns:
The combined filter.

xor

ConvenientFilter<T> xor(Filter<? super T> filter)
Combines the two filters using the logical XOR operation and returns the combined filter.

Parameters:
filter - The filter to combine this filter with.
Returns:
The combined filter.

not

ConvenientFilter<T> not()
Creates a filter that negates the result from this filter.

A filter implementing this method is also recommended to implement a method called bitwiseNegate that delegates to this method. That makes it possible to negate the filter using the ~ operator in a Groovy script.

Returns:
A filter that negates the result from this filter.