Package monq.jfa.actions
Class MapStoreAction<K>
java.lang.Object
monq.jfa.actions.MapStoreAction<K>
- Type Parameters:
K- type of key to use in the map
- All Implemented Interfaces:
Action
The action, when called, will call the bi-consumer defined in the constructor with
the key defined there and the current match. In many cases, the bi-consumer can be the
put() operation of a Map. If this action is called multiple times, it is
up to the bi-consumer to decide how to handle this, e.g. by replacing the mapping with the new
match or by appending it to a list.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinvoke(StringBuilder out, int start) Will be called with new data appended to the givenStringBuilder.
-
Constructor Details
-
MapStoreAction
Creates the action.- Parameters:
key- to used to store the match.store- a bi-consumer which most likely should be shared between severalMapStoreActionobjects with differing keys.
-
-
Method Details
-
invoke
Description copied from interface:ActionWill be called with new data appended to the givenStringBuilder. The method is free to work in any way with the whole text content, not only the new part demarcated by thestartparameter.
-