Package com.blamejared.searchables.lang
Class StringSearcher
java.lang.Object
com.blamejared.searchables.lang.StringSearcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<Expression> expression(String search) Parses the string and returns and optionalExpressionstatic <T,C> Optional <T> search(String search, ContextAwareVisitor<T, C> visitor, C context) Parses the string and visits the given visitor with context.static <T> Optional<T> Parses the string and visits the given visitor.
-
Constructor Details
-
StringSearcher
public StringSearcher()
-
-
Method Details
-
search
Parses the string and visits the given visitor.- Parameters:
search- The string to search.visitor- The visitor to visit.- Returns:
- The optional result of the visitor.
-
search
Parses the string and visits the given visitor with context.- Parameters:
search- The string to search.visitor- The visitor to visit.context- The extra context for the visitor.- Returns:
- The optional result of the visitor.
-
expression
Parses the string and returns and optionalExpression- Parameters:
search- The string to search.- Returns:
- The string as an optional
Expression
-