kawa.lang
public abstract class Pattern extends Object implements Printable
| Field Summary | |
|---|---|
| static Method | matchPatternMethod |
| static ClassType | typePattern |
| Method Summary | |
|---|---|
| Object[] | match(Object obj)
Match this Pattern against an object. |
| abstract boolean | match(Object obj, Object[] vars, int start_vars) Match this Pattern against an Object. |
| abstract int | varCount() |
Parameters: obj object to match against this pattern
Returns: null on failure, or an array of bound pattern variables.
Parameters: obj the Object to match against vars the "pattern variable" values extracted from obj go here start_vars where in vars to strt putting the varCount() values
Returns: true iff the match succeeded.