Class StepDefaultIfNull
java.lang.Object
nl.basjes.parse.useragent.analyze.treewalker.steps.Step
nl.basjes.parse.useragent.analyze.treewalker.steps.compare.StepDefaultIfNull
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class nl.basjes.parse.useragent.analyze.treewalker.steps.Step
destroy, getActualValue, getNextStep, setNextStep, setVerbose, treeIsSeparator, up, walkNextStep
-
Constructor Details
-
StepDefaultIfNull
-
-
Method Details
-
canFail
public boolean canFail()Description copied from class:Step
Some steps cannot fail. For a require rule if the last step cannot fail then this can be removed from the require list to improve performance at run time. -
mustHaveInput
public boolean mustHaveInput()Description copied from class:Step
Some steps can even pass if there is no input provided.- Overrides:
mustHaveInput
in classStep
- Returns:
- If this specific step needs input to pass.
-
walk
public WalkList.WalkResult walk(@Nonnull org.antlr.v4.runtime.tree.ParseTree tree, @Nullable String value) Description copied from class:Step
This will walk into the tree and recurse through all the remaining steps. This must iterate of all possibilities and return the first matching result.- Specified by:
walk
in classStep
- Parameters:
tree
- The tree to walk into.value
- The string representation of the previous step (needed for compare and lookup operations). The null value means to use the implicit 'full' value (i.e. getSourceText(tree) )- Returns:
- Either null or the actual value that was found.
-
toString
-