Package org.meeuw.json.grep
Class GrepEvent
- java.lang.Object
-
- org.meeuw.json.grep.GrepEvent
-
public class GrepEvent extends Object
A grep event is a light wrapper around aParseEvent, but it adds two fields: 'the type' of the event, i.e how wel it matched (#getWeight()and why it matched#getType()- Since:
- 0.4
- Author:
- Michiel Meeuwissen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGrepEvent.Type
-
Constructor Summary
Constructors Constructor Description GrepEvent(ParseEvent result, int weight)GrepEvent(ParseEvent event, GrepEvent.Type type, int weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathgetPath()StringtoString()StringvalueOrNodeAsConciseString()ReturnsParseEvent.valueOrNodeAsConciseString()of the associated#getEvent()StringvalueOrNodeAsString()Returns theParseEvent.valueOrNodeAsString()associated with this event as a string.
-
-
-
Constructor Detail
-
GrepEvent
public GrepEvent(ParseEvent result, int weight)
-
GrepEvent
public GrepEvent(ParseEvent event, GrepEvent.Type type, int weight)
-
-
Method Detail
-
getPath
public Path getPath()
-
valueOrNodeAsConciseString
public String valueOrNodeAsConciseString()
ReturnsParseEvent.valueOrNodeAsConciseString()of the associated#getEvent()
-
valueOrNodeAsString
public String valueOrNodeAsString()
Returns theParseEvent.valueOrNodeAsString()associated with this event as a string.
-
-