Package eu.bandm.tools.paisley
Class FlatMultiTransform<A,B>
java.lang.Object
eu.bandm.tools.paisley.Pattern<A>
eu.bandm.tools.paisley.Unary<B,A>
eu.bandm.tools.paisley.FlatMultiTransform<A,B>
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
MultiTransform
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.bandm.tools.paisley.Pattern
Pattern.Either<A> -
Field Summary
Fields inherited from class eu.bandm.tools.paisley.Pattern
_left_matched, _target_save, none -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose()protected voidcompileClose(CompilationContext context) protected voidcompileHasNext(CompilationContext context) protected voidcompileMatch(CompilationContext context) protected voidcompileMatchAgain(CompilationContext context) protected voidcompileMatchNext(CompilationContext context) protected voidcompileMatchNextBody(CompilationContext context) protected voidcompileNext(CompilationContext context) protected voidcompileOpen(CompilationContext context) voidcut(boolean recursively) Disposes of all internal state related to nondeterminism.abstract booleanhasNext()booleanAttempts to match this pattern against a given object.booleanAttempts to re-match this pattern against a previously matched object.abstract Bnext()abstract voidMethods inherited from class eu.bandm.tools.paisley.Unary
binds, clear, clone, compileClear, compileCut, getBody, isDeterministic, preserves, preserves, setBody, toStringMethods inherited from class eu.bandm.tools.paisley.Pattern
all, all, all, all, all, and, andThen, andThen, any, aside, both, clear, compile, compileClear, compileCut, compileIsDeterministic, compileSubPattern, compileThis, compileUpTo, cut, DEBUG, either, enPassant, flatten, limit, main, matchOnce, matchVar, narrow, newAll, noMatch, none, of, once, or, orElse, orElse, repeat, some, some, some, some, someMatch, startCompile, uniquely, variable, variable
-
Constructor Details
-
FlatMultiTransform
-
-
Method Details
-
match
Description copied from class:PatternAttempts to match this pattern against a given object. If the class of this pattern imposes a specific order on matches, the first one is chosen. -
matchAgain
public boolean matchAgain()Description copied from class:UnaryAttempts to re-match this pattern against a previously matched object. If the class of this pattern imposes a specific order on matches, they are chosen in that order, beginning with the second one. The behaviour of this method is unspecified if the last matching attempt of this pattern has not been successful.Patterns classes that do not override this method are deterministic. Pattern classes that overwrite this method to provide additional matches should also override
Pattern.isDeterministic(). The default implementation delegates toUnary.body.- Overrides:
matchAgainin classUnary<B,A> - Returns:
trueif the matching is successful,falseif it fails. WhichVariables are bound by a successful match depends. The default implementation always returnsfalse.- See Also:
-
cut
public void cut(boolean recursively) Description copied from class:UnaryDisposes of all internal state related to nondeterminism.The default implementation does nothing. Subclasses that override this method should also override
Pattern.clear(boolean)and ensure that it implies the effect ofcut(false). The default implementation delegates toUnary.bodyifrecursivelyistrue. -
open
-
close
public abstract void close() -
hasNext
public abstract boolean hasNext() -
next
-
compileMatch
- Overrides:
compileMatchin classPattern<A>
-
compileMatchAgain
- Overrides:
compileMatchAgainin classPattern<A>
-
compileMatchNext
-
compileMatchNextBody
-
compileOpen
-
compileClose
-
compileHasNext
-
compileNext
-