wyvern.lib.commands.autobag
Class AutobagConditions

java.lang.Object
  extended bywyvern.lib.commands.autobag.AutobagConditions

public class AutobagConditions
extends java.lang.Object

Encapsulates a set of conditions for autobagging an item. An AutobagConditions object always contains exactly one Predicate object. The Predicate is a composite other Predicates. The autobag mini-language supports several "base-level" predicates, and the base-level predicates can be composited with AND, OR, and NOT. Base-level predicates include matching names/descriptions, matching certain predefined properties, and matching predefined types similar to those in the Autograb syntax.

Version:
1.0, Dec 27, 2003
Author:
Steve Yegge

Constructor Summary
AutobagConditions()
           
 
Method Summary
 Predicate getPredicate()
           
 java.lang.String printPredicate(Predicate p)
          Recursive function to print a predicate and its children.
 void setPredicate(Predicate p)
          Sets the top-level Predicate.
 java.lang.String toString()
          Recursively prints out the condition tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutobagConditions

public AutobagConditions()
Method Detail

setPredicate

public void setPredicate(Predicate p)
Sets the top-level Predicate. When an item enters the player's inventory, it will be matched against this Predicate to see if it should be auto-bagged.


getPredicate

public Predicate getPredicate()

toString

public java.lang.String toString()
Recursively prints out the condition tree.


printPredicate

public java.lang.String printPredicate(Predicate p)
Recursive function to print a predicate and its children.