aboutsummaryrefslogtreecommitdiffstats
path: root/predicate-search-core/src/main/java/com/yahoo/search/predicate/optimization/PredicateProcessor.java
blob: 2358ae733e53d1641e748c285af6f7ee3fc07391 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.predicate.optimization;

import com.yahoo.document.predicate.Predicate;

/**
 * A predicate processor takes a predicate, processes it and returns the result.
 * Predicate optimisers typically implement this interface.
 * Note that the interface does not give any guarantees if the processor will
 * modify the predicate in-place or return a new instance.
 *
 * @author bjorncs
 */
@FunctionalInterface
public interface PredicateProcessor {

    /**
     * Processes a predicate.
     *
     * @return the processed predicate.
     */
    Predicate process(Predicate predicate, PredicateOptions options);

}