Class Pattern
java.lang.Object
kawa.lang.Pattern
- All Implemented Interfaces:
gnu.kawa.format.Printable
- Direct Known Subclasses:
AnyPat, EqualPat, ListPat, ListRepeatPat, PairPat, SyntaxPattern, VarListPat
A Pattern is used to match against objects.
E.g. it can be used to match against macro arguments.
-
Field Details
-
typePattern
-
matchPatternMethod
-
-
Constructor Details
-
Pattern
public Pattern()
-
-
Method Details
-
match
-
match
Match this Pattern against an Object.- Parameters:
obj- the Object to match againstvars- the "pattern variable" values extracted from obj go herestart_vars- where in vars to strt putting the varCount() values- Returns:
- true iff the match succeeded.
-
varCount
public abstract int varCount() -
print
- Specified by:
printin interfacegnu.kawa.format.Printable
-