Package io.microsphere.io.scanner
Interface Scanner<S,R>
-
- Type Parameters:
S- the type of the scanned sourceR- the type of the scan result
public interface Scanner<S,R>A component that scans elements of typeSand produces a set of results of typeR.Implementations of this interface are expected to process a source object of type
S, extract or compute a set of result objects of typeR, and return them in a non-null collection. Optionally, aFiltercan be provided to further refine the results.
-
-
Method Detail
-
scan
@Nonnull java.util.Set<R> scan(S source) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
Scan source to calculate result set- Parameters:
source- scanned source- Returns:
- result set , non-null
- Throws:
java.lang.IllegalArgumentException- scanned source is not legaljava.lang.IllegalStateException- scanned source's state is not valid
-
scan
@Nonnull java.util.Set<R> scan(S source, Filter<R> filter) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
Scan source to calculate result set withFilter- Parameters:
source- scanned sourcefilter-filterto accept result- Returns:
- result set , non-null
- Throws:
java.lang.IllegalArgumentException- scanned source is not legaljava.lang.IllegalStateException- scanned source's state is not valid
-
-