Package eu.bandm.tools.paisley
Class Lazy<A>
java.lang.Object
eu.bandm.tools.paisley.Pattern<B>
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
compileClear
(CompilationContext context, boolean recursively) protected void
compileCut
(CompilationContext context, boolean recursively) protected void
compileIsDeterministic
(CompilationContext context) protected void
compileMatch
(CompilationContext context) protected void
compileMatchAgain
(CompilationContext context) getBody()
Creates the wrapped pattern.boolean
Checks whether this pattern is deterministic.boolean
Methods inherited from class eu.bandm.tools.paisley.Unary
binds, clear, clone, cut, matchAgain, 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, 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:Pattern
Checks whether this pattern is deterministic.The default implementation returns
true
.- Overrides:
isDeterministic
in classUnary<A,
A> - Returns:
true
if this pattern is guaranteed to match any object at most once,false
otherwise.- See Also:
-
init
Creates the wrapped pattern. -
compileMatch
- Overrides:
compileMatch
in classProxy<A>
-
compileMatchAgain
- Overrides:
compileMatchAgain
in classProxy<A>
-
compileIsDeterministic
- Overrides:
compileIsDeterministic
in classPattern<A>
-
compileCut
- Overrides:
compileCut
in classUnary<A,
A>
-
compileClear
- Overrides:
compileClear
in classUnary<A,
A>
-