public final class Result extends Object implements PatternResult, PatternMapping
| Modifier and Type | Field and Description |
|---|---|
static Result |
NOT_MATCHED |
protected Map<String,Object> |
results |
| Constructor and Description |
|---|
Result(Snippet source,
Map<String,Object> results) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
get(String id)
Get value using the given name
|
<T> T |
get(String id,
Class<T> type) |
Snippet |
getSource()
Get matched source
|
boolean |
has(String id) |
boolean |
has(Token token) |
boolean |
isMatched()
Check if result is matched
|
public static final Result NOT_MATCHED
public boolean has(String id)
public boolean has(Token token)
public boolean isMatched()
PatternResultisMatched in interface PatternResultpublic <T> T get(String id)
PatternMappingget in interface PatternMappingT - type of resultid - the name to search forpublic Snippet getSource()
PatternResultgetSource in interface PatternResultCopyright © 2020. All rights reserved.