public abstract class Constraint extends Atomic<Object>
Constructor and Description |
---|
Constraint() |
Modifier and Type | Method and Description |
---|---|
static Constraint |
all(Constraint... cs) |
static Constraint |
all(List<? extends Constraint> cs) |
protected void |
compileMatch(eu.bandm.tools.paisley.CompilationContext context) |
boolean |
match(Object target)
Attempts to match this pattern against a given object.
|
static Constraint |
some(Constraint... cs) |
static Constraint |
some(List<? extends Constraint> cs) |
abstract boolean |
test() |
binds, clone, compileClear, compileClear, compileCut, compileCut, compileMatchAgain, isDeterministic, matchAgain, preserves, preserves
all, all, all, all, all, and, andThen, andThen, any, any, aside, both, clear, clear, compareTo, compile, compileIsDeterministic, compileSubPattern, compileThis, compileUpTo, cut, cut, DEBUG, either, enPassant, eq, eqNull, equal, filter, flatten, forInstancesOf, limit, main, matchOnce, matchVar, narrow, neq, neqNull, newAll, noMatch, none, or, orElse, orElse, repeat, some, some, some, some, someMatch, startCompile, test, transform, uniquely, variable, variable
public boolean match(Object target)
Pattern
match
in class Pattern<Object>
target
- the object to match againsttrue
if the matching is successful, false
if it fails. Which Variable
s are bound by a
successful or failed match depends.Pattern.binds(Variable)
,
Pattern.preserves(Variable, boolean)
public abstract boolean test()
public static Constraint all(Constraint... cs)
public static Constraint all(List<? extends Constraint> cs)
public static Constraint some(Constraint... cs)
public static Constraint some(List<? extends Constraint> cs)
protected void compileMatch(eu.bandm.tools.paisley.CompilationContext context)
compileMatch
in class Pattern<Object>
see also the complete user documentation .