public static Filter removeFilter(Filter baseFilter, Filter targetFilter, boolean recurse) { return STATIC.remove(baseFilter, targetFilter, recurse); }
public static Filter removeFilter(Filter baseFilter, Filter targetFilter) { return STATIC.remove(baseFilter, targetFilter); }
/** * Removes the targetFilter from the baseFilter if the baseFilter is a group filter (And or * Or),recursing into any sub-logic filters to find the targetFilter if necessary. * * <ul> * <li>If the targetFilter equals the baseFilter, then Filter.INCLUDE is returned to indicate * that no filters are left. * <li>If the targetFilter does not equal the base filter, no change is made and the * baseFilter is returned. * <li>If removing the targetFilter would leave only a single term within the baseFilter, then * the single remaining term is returned instead of the (now invalid) baseFilter. If the * last item is removed from an Or statement then Filter.EXCLUDE is return If the last * item is removed from an And statement then Filter.INCLUDE is returned * </ul> * * @param baseFilter * @param targetFilter * @return */ public Filter remove(Filter baseFilter, Filter targetFilter) { return remove(baseFilter, targetFilter, true); }
public static Filter removeFilter(Filter baseFilter, Filter targetFilter, boolean recurse) { return STATIC.remove(baseFilter, targetFilter, recurse ); }
public static Filter removeFilter( Filter baseFilter, Filter targetFilter ){ return STATIC.remove(baseFilter, targetFilter); }
/** * Removes the targetFilter from the baseFilter if the baseFilter is a group filter (And or * Or),recursing into any sub-logic filters to find the targetFilter if necessary. * <ul> * <li>If the targetFilter equals the baseFilter, then Filter.INCLUDE is returned to indicate * that no filters are left.</li> * <li>If the targetFilter does not equal the base filter, no change is made and the baseFilter * is returned.</li> * <li>If removing the targetFilter would leave only a single term within the baseFilter, then the single * remaining term is returned instead of the (now invalid) baseFilter. * </li>If the last item is removed from an Or statement then Filter.EXCLUDE is return * </li>If the last item is removed from an And statement then Filter.INCLUDE is returned * </ul> * * @param baseFilter * @param targetFilter * @return */ public Filter remove(Filter baseFilter, Filter targetFilter) { return remove(baseFilter, targetFilter, true); }