Package kawa.lang
Class VarListPat
java.lang.Object
kawa.lang.Pattern
kawa.lang.VarListPat
- All Implemented Interfaces:
gnu.kawa.format.Printable
A Pattern that will match a list of a given minimum length.
-
Field Summary
Fields inherited from class kawa.lang.Pattern
matchPatternMethod, typePattern
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VarListPat
public VarListPat(int min)
-
-
Method Details
-
match
Succeeds of obj is a list with at least min_length elements.- Specified by:
match
in classPattern
- 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 if the match succeeded. The elements vars[start_vars .. start_vars + min_length] contain the first min_length elements of obj followed by the min_length'th cdr of obj.
-
varCount
public int varCount() -
print
-