001package org.jadira.scanner.core.api;
002
003import java.util.List;
004
005public interface Resolver<T, E, A> {
006
007        /**
008         * Resolve the first match
009         * @param locator Locator to be used
010         * @param projector Projector to be used
011         * @param filter Zero or more filters to be used
012         * @return The first match
013         */
014        T resolveFirst(Locator<A> locator, Projector<E> projector, Filter<?>... filter);
015        
016        /**
017         * Resolve all matches up to limit
018         * @param limit The maximum number of results to match
019         * @param locator Locator to be used
020         * @param projector Projector to be used
021         * @param filter Zero or more filters to be used
022         * @return The first match
023         */
024        List<? extends T> resolve(Integer limit, Locator<A> locator, Projector<E> projector, Filter<?>... filter);
025        
026        /**
027         * Resolve all matches
028         * @param locator Locator to be used
029         * @param projector Projector to be used
030         * @param filter Zero or more filters to be used
031         * @return The first match
032         */
033        List<? extends T> resolveAll(Locator<A> locator, Projector<E> projector, Filter<?>... filter);
034}