wyvern.lib.predicates
Class InstanceOfPredicate

java.lang.Object
  extended bywyvern.lib.predicates.InstanceOfPredicate
All Implemented Interfaces:
Predicate

public class InstanceOfPredicate
extends java.lang.Object
implements Predicate

This predicate returns true if the object is an instance of the specified class or interface.

Version:
1.0, Apr 28, 1998
Author:
Steve Yegge

Constructor Summary
InstanceOfPredicate(java.lang.Class clazz)
          Constructs a new InstanceOfPredicate.
 
Method Summary
 boolean predicate(GameObject obj)
          Implements Predicate.predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceOfPredicate

public InstanceOfPredicate(java.lang.Class clazz)
Constructs a new InstanceOfPredicate.

Parameters:
clazz - the class or interface to check against.
Method Detail

predicate

public boolean predicate(GameObject obj)
Implements Predicate.predicate.

Specified by:
predicate in interface Predicate
Parameters:
obj - any GameObject
Returns:
true if the object passes, else false