1 package kawa.lang; 2 import gnu.mapping.*; 3 import java.io.*; 4 import gnu.text.Printable; 5 import gnu.lists.Consumer; 6 7 10 11 public class AnyPat extends Pattern implements Printable, Externalizable 12 { 13 public AnyPat () { } 14 15 public static AnyPat make () { return new AnyPat (); } 16 17 public void print (Consumer out) 18 { 19 out.write("#<match any>"); 20 } 21 22 public boolean match (Object obj, Object [] vars, int start_vars) 23 { 24 vars[start_vars] = obj; 25 return true; 26 } 27 28 public int varCount () { return 1; } 29 30 33 public void writeExternal(ObjectOutput out) throws IOException 34 { 35 } 36 37 public void readExternal(ObjectInput in) 38 throws IOException, ClassNotFoundException 39 { 40 } 41 } 42 | Popular Tags |