Package cz.vutbr.fit.layout.map
Class ExampleMatcher
- java.lang.Object
-
- cz.vutbr.fit.layout.map.ExampleMatcher
-
public class ExampleMatcher extends Object
Matches the generated examples as defined.- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description ExampleMatcher(MetadataExampleGenerator exampleGenerator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(String rawText, Consumer<List<Example>> op)
Matches the configured examples to the given text and applies a consumer function on the matched examples (if any).
-
-
-
Constructor Detail
-
ExampleMatcher
public ExampleMatcher(MetadataExampleGenerator exampleGenerator)
-
-
Method Detail
-
match
public boolean match(String rawText, Consumer<List<Example>> op)
Matches the configured examples to the given text and applies a consumer function on the matched examples (if any).- Parameters:
rawText
- the raw text to matchop
- the consumer function to be applied on the matched examples- Returns:
true
if something has matched,false
otherwise
-
-