Package eu.bandm.tools.paisley
Class Lazy<A>
java.lang.Object
eu.bandm.tools.paisley.Pattern<A>
eu.bandm.tools.paisley.Unary<A,A>
eu.bandm.tools.paisley.Proxy<A>
eu.bandm.tools.paisley.Lazy<A>
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
Variable.LazyPlus
Wrapper class for a pattern that is to be created on demand.
Subclasses of this class must implement the init(Pattern)
method.
- 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 TypeMethodDescriptionprotected voidcompileClear(CompilationContext context, boolean recursively) protected voidcompileCut(CompilationContext context, boolean recursively) protected voidcompileIsDeterministic(CompilationContext context) protected voidcompileMatch(CompilationContext context) protected voidcompileMatchAgain(CompilationContext context) getBody()Creates the wrapped pattern.booleanChecks whether this pattern is deterministic.booleanMethods inherited from class eu.bandm.tools.paisley.Unary
binds, clear, clone, cut, matchAgain, 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, 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
-
Lazy
protected Lazy()
-
-
Method Details
-
getBody
-
isInitialized
public boolean isInitialized() -
isDeterministic
public boolean isDeterministic()Description copied from class:UnaryChecks whether this pattern is deterministic.The default implementation returns
true. This implementation delegates toUnary.body.- Overrides:
isDeterministicin classUnary<A,A> - Returns:
trueif this pattern is guaranteed to match any object at most once,falseotherwise.- See Also:
-
init
Creates the wrapped pattern. -
compileMatch
- Overrides:
compileMatchin classProxy<A>
-
compileMatchAgain
- Overrides:
compileMatchAgainin classProxy<A>
-
compileIsDeterministic
- Overrides:
compileIsDeterministicin classPattern<A>
-
compileCut
- Overrides:
compileCutin classUnary<A,A>
-
compileClear
- Overrides:
compileClearin classUnary<A,A>
-