Package eu.bandm.tools.paisley
Class RestrictedTransform<A,B>
java.lang.Object
eu.bandm.tools.paisley.Pattern<B>
eu.bandm.tools.paisley.Unary<B,A>
eu.bandm.tools.paisley.Transform<A,B>
eu.bandm.tools.paisley.RestrictedTransform<A,B>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
CachedTransform
,Filter
- 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
ModifierConstructorDescriptionprotected
RestrictedTransform
(Pattern<? super B> body) Creates a new pattern. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
compileIsDomain
(CompilationContext context) protected void
compileIsRange
(CompilationContext context) protected void
compileMatch
(CompilationContext context) protected void
compileMatchAgain
(CompilationContext context) boolean
boolean
boolean
Attempts to match this pattern against a given object.boolean
Attempts to re-match this pattern against a previously matched object.Methods inherited from class eu.bandm.tools.paisley.Transform
apply, compileApply
Methods inherited from class eu.bandm.tools.paisley.Unary
binds, clear, clone, compileClear, compileCut, cut, getBody, isDeterministic, preserves, preserves, setBody, toString
Methods 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
-
RestrictedTransform
Creates a new pattern.
-
-
Method Details
-
match
Description copied from class:Pattern
Attempts 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:Pattern
Attempts 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()
.- Overrides:
matchAgain
in classUnary<B,
A> - Returns:
true
if the matching is successful,false
if it fails. WhichVariable
s are bound by a successful match depends. The default implementation always returnsfalse
.- See Also:
-
isDomain
-
isRange
-
compileMatch
- Overrides:
compileMatch
in classPattern<A>
-
compileMatchAgain
- Overrides:
compileMatchAgain
in classPattern<A>
-
compileIsDomain
-
compileIsRange
-