public class ParserProxy<U,T> extends java.lang.Object implements AbstractParser<T>
MATCHING_ALL| Constructor and Description |
|---|
ParserProxy(Parser<U> component,
java.util.function.Function<? super U,? extends T> transform) |
ParserProxy(java.util.function.Supplier<Parser<U>> component,
java.util.function.Function<? super U,? extends T> transform) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.function.Supplier<Parser<U>> |
getComponent() |
java.util.function.Function<? super U,? extends T> |
getTransform() |
ParseResult<T> |
parseSubstringImpl(ParseState state) |
java.lang.String |
toString() |
<V> Parser<V> |
transform(java.util.function.Function<? super T,? extends V> transform)
Derive a new
Parser instance from the receiving instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendTransform, appendTransform, orElse, orElse, parse, parseSubstring, prependTransform, prependTransform, tryAppendTransform, tryPrependTransformpublic ParserProxy(Parser<U> component, java.util.function.Function<? super U,? extends T> transform)
public <V> Parser<V> transform(java.util.function.Function<? super T,? extends V> transform)
ParserParser instance from the receiving instance.
The new parser will match the same text as the given parser, but the object
parsed will be transformed by the given Function.
transform in interface AbstractParser<T>transform in interface Parser<T>V - the type of the object of the new parser, post-transformationtransform - the transformation to apply to the object given by application of
this parserParser instance which applies the given
transformationpublic ParseResult<T> parseSubstringImpl(ParseState state)
parseSubstringImpl in interface AbstractParser<T>public java.lang.String toString()
toString in class java.lang.Object