wyvern.lib.commands
Class OpenCommand.KeyPredicate

java.lang.Object
  extended bywyvern.lib.commands.OpenCommand.KeyPredicate
All Implemented Interfaces:
Predicate
Enclosing class:
OpenCommand

public class OpenCommand.KeyPredicate
extends java.lang.Object
implements Predicate

A predicate to look for a key that will open the specified lock.


Constructor Summary
OpenCommand.KeyPredicate(Lock lock)
          Constructs a new KeyPredicate
 
Method Summary
 boolean predicate(GameObject obj)
          Returns true if the object is a key that can unlock the passed lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenCommand.KeyPredicate

public OpenCommand.KeyPredicate(Lock lock)
Constructs a new KeyPredicate

Method Detail

predicate

public boolean predicate(GameObject obj)
Returns true if the object is a key that can unlock the passed lock. The object can be a QuestItem or a Key.

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