Class BindPointParser
java.lang.Object
io.nosqlbench.virtdata.core.templates.BindPointParser
- All Implemented Interfaces:
java.util.function.BiFunction<java.lang.String,java.util.Map<java.lang.String,java.lang.String>,BindPointParser.Result>
public class BindPointParser extends java.lang.Object implements java.util.function.BiFunction<java.lang.String,java.util.Map<java.lang.String,java.lang.String>,BindPointParser.Result>
BindPointParser parses a user-provide string template into spans. It builds a simple list of
BindPoints, and provides both the parsed spans and the BindPoints in a result.
Spans are provided as a list of even,(odd,even,...) string values, where there is always an odd number of entries
and odd-numbered entries are the text extracted from a binding. The binding values are not
changed from the user-specified string, and are not normalized to one of the
BindPoint.Types.
This is for troubleshooting and diagnostic purposes.
Callers will need to look at the BindPoint types to know whether a binding is provided and thus how to process it.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBindPointParser.Result -
Field Summary
Fields Modifier and Type Field Description static java.util.regex.PatternBINDPOINT_ANCHORstatic java.lang.StringDEFINITION -
Constructor Summary
Constructors Constructor Description BindPointParser() -
Method Summary
Modifier and Type Method Description BindPointParser.Resultapply(java.lang.String template, java.util.Map<java.lang.String,java.lang.String> bindings)
-
Field Details
-
BINDPOINT_ANCHOR
public static final java.util.regex.Pattern BINDPOINT_ANCHOR -
DEFINITION
public static final java.lang.String DEFINITION- See Also:
- Constant Field Values
-
-
Constructor Details
-
BindPointParser
public BindPointParser()
-
-
Method Details
-
apply
public BindPointParser.Result apply(java.lang.String template, java.util.Map<java.lang.String,java.lang.String> bindings)- Specified by:
applyin interfacejava.util.function.BiFunction<java.lang.String,java.util.Map<java.lang.String,java.lang.String>,BindPointParser.Result>
-