kawa.lang
Class AnyPat

java.lang.Object
  extended by kawa.lang.Pattern
      extended by kawa.lang.AnyPat
All Implemented Interfaces:
Printable, java.io.Externalizable, java.io.Serializable

public class AnyPat
extends Pattern
implements Printable, java.io.Externalizable

A pattern that matches anything.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class kawa.lang.Pattern
matchPatternMethod, typePattern
 
Constructor Summary
AnyPat()
           
 
Method Summary
static AnyPat make()
           
 boolean match(java.lang.Object obj, java.lang.Object[] vars, int start_vars)
          Match this Pattern against an Object.
 void print(Consumer out)
           
 void readExternal(java.io.ObjectInput in)
           
 int varCount()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class kawa.lang.Pattern
match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnyPat

public AnyPat()
Method Detail

make

public static AnyPat make()

print

public void print(Consumer out)
Specified by:
print in interface Printable

match

public boolean match(java.lang.Object obj,
                     java.lang.Object[] vars,
                     int start_vars)
Description copied from class: Pattern
Match this Pattern against an Object.

Specified by:
match in class Pattern
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.

varCount

public int varCount()
Specified by:
varCount in class Pattern

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException