Splits the filter from its conjunctive normal form. And'ng the filters
together produces the full conjunctive normal form.

@return unmodifiable list of sub filters which don't perform any 'and'
operations
@since 1.1.1
976535
public List<Filter<S>> conjunctiveNormalFormSplit() {
        final List<Filter<S>> list = new ArrayList<Filter<S>>();

        conjunctiveNormalForm().accept(new Visitor<S, Object, Object>() {
            @Override
            public Object visit(OrFilter<S> filter, Object param) {
                list.add(filter);
                return null;
            }

            @Override
            public Object visit(PropertyFilter<S> filter, Object param) {
                list.add(filter);
                return null;
            }

            @Override
            public Object visit(ExistsFilter<S> filter, Object param) {
                list.add(filter);
                return null;
            }
        }, null);

        return Collections.unmodifiableList(list);
    }
232980
public static <T> List<T> filter(final Iterable<T> unfiltered, final Predicate<T> filter) {
        return newArrayList(Iterables.filter(unfiltered, filter));
    }
752081
public static FilterFragment[] from(Filter... filters) {
        FilterFragment[] ret = new FilterFragment[filters.length];
        Arrays.setAll(ret, (i) -> new FilterFragment(filters[i]));
        return ret;
    }
1158069
private List<IndexedQueryAnalyzer<S>.Result>
        splitIntoSubResults(Filter<S> filter, OrderingList<S> ordering, QueryHints hints)
        throws SupportException, RepositoryException
    {
        // Required for split to work.
        Filter<S> dnfFilter = filter.disjunctiveNormalForm();

        Splitter splitter = new Splitter(ordering, hints);
        RepositoryException e = dnfFilter.accept(splitter, null);
        if (e != null) {
            throw e;
        }

        List<IndexedQueryAnalyzer<S>.Result> subResults = splitter.mSubResults;

        // Check if any sub-result handles nothing. If so, a full scan is the
        // best option for the entire query and all sub-results merge into a
        // single sub-result. Any sub-results which filter anything and contain
        // a join property in the filter are exempt from the merge. This is
        // because fewer joins are read than if a full scan is performed for
        // the entire query. The resulting union has both a full scan and an
        // index scan.

        IndexedQueryAnalyzer<S>.Result full = null;
        for (IndexedQueryAnalyzer<S>.Result result : subResults) {
            if (!result.handlesAnything()) {
                full = result;
                break;
            }
            if (!result.getCompositeScore().getFilteringScore().hasAnyMatches()) {
                if (full == null) {
                    // This index is used only for its ordering, and it will be
                    // tentatively selected as the "full scan". If a result is
                    // found doesn't use an index for anything, then it becomes
                    // the "full scan" index.
                    full = result;
                }
            }
        }

        if (full == null) {
            // Okay, no full scan needed.
            return subResults;
        }

        List<IndexedQueryAnalyzer<S>.Result> mergedResults =
            new ArrayList<IndexedQueryAnalyzer<S>.Result>();

        for (IndexedQueryAnalyzer<S>.Result result : subResults) {
            if (result == full) {
                // Add after everything has been merged into it.
                continue;
            }

            boolean exempt = result.getCompositeScore().getFilteringScore().hasAnyMatches();

            if (exempt) {
                // Must also have a join in the filter to be exempt.
                List<PropertyFilter<S>> subFilters = PropertyFilterList.get(result.getFilter());

                joinCheck: {
                    for (PropertyFilter<S> subFilter : subFilters) {
                        if (subFilter.getChainedProperty().getChainCount() > 0) {
                            // A chain implies a join was followed, so result is exempt.
                            break joinCheck;
                        }
                    }
                    // No joins found, result is not exempt from merging into full scan.
                    exempt = false;
                }
            }

            if (exempt) {
                mergedResults.add(result);
            } else {
                full = full.mergeRemainderFilter(result.getFilter());
            }
        }

        if (mergedResults.size() == 0) {
            // Nothing was exempt. Rather than return a result with a dnf
            // filter, return full scan with a simpler reduced filter.
            full = full.withRemainderFilter(filter.reduce());
        }

        mergedResults.add(full);

        return mergedResults;
    }
818556
public function getAllFilters()
    {
        $filters = [];

        foreach ($this->filters as $filter) {
            $filters = array_merge($filters, $filter->getAllFilters());
        }

        return $filters;
    }
1369156
public java.util.List<DocumentFilter> getDocumentFilterList() {
        if (documentFilterList == null) {
            documentFilterList = new com.amazonaws.internal.SdkInternalList<DocumentFilter>();
        }
        return documentFilterList;
    }
766813
public Filter toFilter() {
        Filter[] result = new Filter[filters.size()];
        for (int i = 0; i < result.length; i++) {
            result[i] = filters.get(i).createFilter();
        }
        return chain(result);
    }
986814
public Collection<Member> members(MemberFilter filter) {
        return get(Member.class, (filter != null) ? filter : new MemberFilter());
    }
1099976
public QueryNode[] getOperands() {
        if (operands == null) {
            return new QueryNode[0];
        } else {
            return (QueryNode[]) operands.toArray(new QueryNode[operands.size()]);
        }
    }
440374
public List<?> getNotSelected() {
		List options = getOptions();
		if (options == null || options.isEmpty()) {
			return Collections.EMPTY_LIST;
		}

		List notSelected = new ArrayList(options);
		notSelected.removeAll(getSelected());
		return Collections.unmodifiableList(notSelected);
	}
947877
static <S extends Storable> List<Filter<S>> split(Filter<S> filter) {
        return filter == null ? null : filter.conjunctiveNormalFormSplit();
    }
12762
private List<Filter<S>> findCoveringMatches() {
        List<Filter<S>> coveringFilters = null;

        boolean check = !mRemainderFilters.isEmpty()
            && (mIdentityFilters.size() > 0
                || mRangeStartFilters.size() > 0 
                || mRangeEndFilters.size() > 0);

        if (check) {
            // Any remainder property which is provided by the index is a covering match.
            for (Filter<S> subFilter : mRemainderFilters) {
                if (isProvidedByIndex(subFilter)) {
                    if (coveringFilters == null) {
                        coveringFilters = new ArrayList<Filter<S>>();
                    }
                    coveringFilters.add(subFilter);
                }
            }
        }

        return prepareList(coveringFilters);
    }
152324
public List<Split<Flow<T>>> getAllSplit()
   {
      List<Split<Flow<T>>> list = new ArrayList<Split<Flow<T>>>();
      List<Node> nodeList = childNode.get("split");
      for(Node node: nodeList)
      {
         Split<Flow<T>>  type = new SplitImpl<Flow<T>>(this, "split", childNode, node);
         list.add(type);
      }
      return list;
   }
865023
public List<DistinctQueryResult> divide() {
        return Lists.newArrayList(Iterators.transform(resultData, new Function<QueryRow, DistinctQueryResult>() {
            
            @Override
            public DistinctQueryResult apply(final QueryRow row) {
                Set<QueryRow> resultData = new LinkedHashSet<>();
                resultData.add(row);
                return new DistinctQueryResult(columnLabelAndIndexMap, resultData.iterator());
            }
        }));
    }
902117
public List<Double> getSplits() {
        List<Double> splits = new ArrayList<Double>();
        for (Node curNode : getVisibleChildren()) {
            splits.add(nodeSplits.get(curNode));
        }
        return splits;
    }
602257
public CmsLockFilter getNonBlockingFilter() {

        if (m_nonBlockingFilter == null) {
            m_nonBlockingFilter = CmsLockFilter.FILTER_ALL;
            m_nonBlockingFilter = m_nonBlockingFilter.filterLockableByUser(
                getCms().getRequestContext().getCurrentUser());
            m_nonBlockingFilter = m_nonBlockingFilter.filterSharedExclusive();
        }
        return m_nonBlockingFilter;
    }
1085931
public List<String> splitAndEvaluate() {
        if (null == inlineExpression) {
            return Collections.emptyList();
        }
        return flatten(evaluate(split()));
    }