All Packages  Class Hierarchy

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Index of all Fields and Methods

A

Action(Updateable, Hashtable). Constructor for class logic.Action
This constructor handles all the more complicated scenarios in which more is required from an action then setting a single attribute.
Action(Updateable, Object). Constructor for class logic.Action
This is the "default" constructor -- it handles the simple case in which the required action simply sets a value in the Updateable object.
actions. Variable in class logic.Invoker
addRule(String, Action). Method in class logic.Rules
This method adds a new boolean-sequence / action pair to the rules Hashtable.
attribute. Variable in class logic.Action
This is an attribute that is passed in and set with the "typical" constructor, following the default framework behavior.

B

b1. Variable in class logic.Condition
b2. Variable in class logic.Condition
badOperator(int). Method in class logic.Condition
returns true if the argument op is not one of the legal operators
BOOLEAN. Variable in class logic.Condition
BooleanTuple(Vector). Constructor for class logic.BooleanTuple
The constructor accepts a Vector of Conditions -- only 30 are allowed.
BooleanTupleFactory(). Constructor for class logic.BooleanTupleFactory
bottomBgColor. Variable in class IteGUI

C

codeSelection. Variable in class IteGUI
codeSelectionModel. Variable in class IteGUI
computeIndicesOfStarredCols(String). Static method in class logic.BooleanTupleFactory
Places the positions of '*' in s into an array.
Condition(boolean, boolean). Constructor for class logic.Condition
This constructor compares two booleans to see if they are the same.
Condition(double, int, double). Constructor for class logic.Condition
This constructor compares two doubles using the comparison named by oper.
Condition(float, int, float). Constructor for class logic.Condition
This constructor compares two float's using the comparison named by oper.
Condition(Hashtable). Constructor for class logic.Condition
This version of Condition accepts a Hashtable that must contain all the data that is necessary to implement the evaluate() method -- the evaluate() method must be overridden if this constructor is used.
Condition(int, int, int). Constructor for class logic.Condition
This constructor compares two int's using the comparison named by oper.
Condition(Object, Object). Constructor for class logic.Condition
This constructor is used when two objects need to be compared.
conditions. Variable in class logic.Invoker
countStars(String). Static method in class logic.BooleanTupleFactory
Counts the number of '*'s that occur in s
countTuples(String). Static method in class logic.BooleanTupleFactory
Counts the number of boolean strings (like "TFFTF") that will be derived from s.
createButtonPanel(). Method in class IteGUI
createGUI(). Method in class IteGUI
createLabeledUrlTextField(). Method in class IteGUI
createLowerPanel(). Method in class IteGUI
createModels(). Method in class IteGUI
createUpperPanel(). Method in class IteGUI

D

d1. Variable in class logic.Condition
d2. Variable in class logic.Condition
data. Variable in class logic.Condition
DataBank(String, int, DataBank. Region). Constructor for class DataBank
This is the version of the constructor that is used in the samples
DataBank(String, int, int). Constructor for class DataBank
DataNotFoundException(). Constructor for class logic.DataNotFoundException
DataNotFoundException(String). Constructor for class logic.DataNotFoundException
db. Variable in class IteGUI
db. Variable in class URLProcessor
decideUrl(). Method in class URLProcessor
this is the central method that is implemented in the subclasses
decideUrl(). Method in class URLProcessor_bad
ugly nested-if code
decideUrl(). Method in class URLProcessor_good
this is the central method that is implemented in the subclasses
DOUBLE. Variable in class logic.Condition
doUpdate(Hashtable). Method in interface logic.Updateable
Default behavior: if the Action that calls this method is simply setting the value of an attribute, the method body for doUpdate should look like this (for concreteness, we'll assume the attribute is a String -- you must cast the Hashtable value val to the appropriate type)
      Object val = vals.get(Action.MAIN_KEY);
      setValue((String)val);
  
doUpdate(Hashtable). Method in class URLProcessor_good
Updateable interface implementation

E

EAST. Variable in class IteGUI
EAST_NOT_PRIVILEGED. Variable in class URLProcessor
EAST_PRIVILEGED. Variable in class URLProcessor
EAST_REGION. Static variable in class DataBank
EQUAL. Static variable in class logic.Condition
equals(Object). Method in class logic.BooleanTuple
Two BooleanTuples are equal if they are both nonnull, and their underlying instances of Boolean[] have the same length and have entries that have the same booleanValue()'s.
evaluate(). Method in class logic.Condition
If the Hashtable version of the constructor is used, this method must be overridden; otherwise the present version of evaluate should work without modification
evaluateBoolean(). Method in class logic.Condition
evaluateConditions(Vector). Method in class logic.IfThenElse
This method evaluates each Condition in the Vector argument and loads the resulting Booleans in a Vector that is ultimately returned.
evaluateDouble(). Method in class logic.Condition
evaluateFloat(). Method in class logic.Condition
evaluateInteger(). Method in class logic.Condition
evaluateObject(). Method in class logic.Condition
Note that the equals() method of Object should have been overridden in order for this method to work as desired.
execute(). Method in class logic.Action
What is provided here is default behavior.
execute(). Method in class logic.Invoker
This method fires off the if-then-else logic.
executeAction(Vector, Rules). Method in class logic.IfThenElse
This method takes the Vector of results obtained from evaluateConditions(..) and wraps it in a BooleanTuple.

F

f1. Variable in class logic.Condition
f2. Variable in class logic.Condition
findIndex(int, int[]). Static method in class logic.Util
Returns -1 if val is not one of the elements of intArr; otherwise returns the index of val in intArr.
FLOAT. Variable in class logic.Condition
frameworkChoices. Variable in class IteGUI

G

getBoolean(char). Static method in class logic.BooleanTupleFactory
Converts 'T' and 'F' to the corresponding Booleans
getConditions(). Method in class logic.Invoker
getData(). Method in class logic.Condition
getDb(). Method in class URLProcessor
getLimit(). Method in class DataBank
getRegion(). Method in class DataBank
getRules(). Method in class logic.Invoker
getTuple(). Method in class logic.BooleanTuple
getTuple(String). Static method in class logic.BooleanTupleFactory
This method returns a vector of Booleans, wrapped in a BooleanTuple, that corresponds to a boolean String like "TTFFF".
getTuples(String). Static method in class logic.BooleanTupleFactory
This method generates the array of BooleanTuples that is generated from the boolean String tf (like "TT**F") -- a String that may contain '*'s.
getUd(). Method in class logic.Action
getUpdateVals(). Method in class logic.Action
getUrl(). Method in class URLProcessor
getUserId(). Method in class DataBank
getWestMembers(). Method in class DataBank

H

hashCode(). Method in class logic.BooleanTuple
The algorithm used here is to treat a sequence of booleans as a binary sequence, with T=1 and F=0, and then treat the binary sequence as an actual binary integer.

I

i1. Variable in class logic.Condition
i2. Variable in class logic.Condition
IF_THEN_ELSE. Variable in class IteGUI
IF_THEN_ELSE_CLASS. Variable in class IteGUI
IfThenElse(Vector, Rules). Constructor for class logic.IfThenElse
The Vector of conditions represent a single specific sequence of conditions we are interested in evaluating and performing an action on The rules are a map that relates each sequence of Booleans to an action that should be fired.
IllegalExpressionException(). Constructor for class logic.IllegalExpressionException
IllegalExpressionException(String). Constructor for class logic.IllegalExpressionException
init(). Method in class logic.Invoker
This method should be called at "startup" -- some time before if-then-else logic needs to be performed.
init(). Method in class IteGUI
initializeComboBoxes(). Method in class IteGUI
initializeInternalTables(). Method in class IteGUI
initializeWestMembers(). Method in class DataBank
Creates the table of user id's that are to be considered members of the West Alliance
INTEGER. Variable in class logic.Condition
Invoker(). Constructor for class logic.Invoker
Invoker(Updateable). Constructor for class logic.Invoker
isMemberWestAlliance(String). Method in class URLProcessor_bad
this method is replaced by code in MemberCondition in URLProcessor_good
IteGUI(). Constructor for class IteGUI

L

LESS. Static variable in class logic.Condition
LESS_EQUAL. Static variable in class logic.Condition
limit. Variable in class DataBank
LIMIT_THRESHOLD. Static variable in class DataBank
limitThreshold. Variable in class IteGUI
limitThresholdModel. Variable in class IteGUI
loadConditions(). Method in class logic.Invoker
loadRules(). Method in class logic.Invoker
lookUp(BooleanTuple). Method in class logic.Rules
This method looks up, in ruleTable, the action that corresponds to the BooleanTuple passed in.

M

main(String[]). Static method in class logic.BooleanTupleFactory
The purpose of this main method is to verify that the truthTable(..) method produces correct output.
main(String[]). Static method in class IteGUI
The main method allows you to run the applet in a JFrame.
main(String[]). Static method in class URLProcessor_bad
This main method lets you run the code as an application without using a GUI.
main(String[]). Static method in class URLProcessor_good
This main method lets you run the sample code as an application with no GUI.
MAIN_KEY. Static variable in class logic.Action
This String is used as a key in the default behavior of this class -- when the first constructor is used, attribute is set as value in a hashtable, using MAIN_KEY as key.
mainBgColor. Variable in class IteGUI
MAX_LEVELS_OF_NESTING. Static variable in interface logic.BooleanTupleConstants
num levels of nesting allowed--note that the product of the first 9 primes is around 200 million, but the product of the first 10 primes exceeds 6 billion, so cannot be an int
MIDWEST. Variable in class IteGUI
MIDWEST_REGION. Static variable in class DataBank
msg. Static variable in class logic.RuleNotFoundException

N

NESTED_IF. Variable in class IteGUI
NESTED_IF_CLASS. Variable in class IteGUI
NestingTooDeepException(). Constructor for class logic.NestingTooDeepException
NestingTooDeepException(String). Constructor for class logic.NestingTooDeepException
newLabeledComponent(JLabel, JComponent). Static method in class IteGUI
Creates a panel with a label in the top part and a JComponent in the bottom part
NORTH. Variable in class IteGUI
NORTH_REGION. Static variable in class DataBank
num(Boolean). Method in class logic.BooleanTuple
NUM_FRAMEWORK_CHOICES. Variable in class IteGUI
NUM_REGION_CHOICES. Variable in class IteGUI

O

ob1. Variable in class logic.Condition
ob2. Variable in class logic.Condition
OBJECT. Variable in class logic.Condition
obtainBoolChar(int, int, char, int[]). Static method in class logic.BooleanTupleFactory
If character c is just 'T' or 'F', this method just returns c.
op. Variable in class logic.Condition
OTHER_REGION. Variable in class URLProcessor

P

positionFrameOnDesktop(JFrame). Static method in class IteGUI
This method is just for use with the main method to position the test frame properly on the screen

R

region. Variable in class DataBank
region. Variable in class IteGUI
regionChoices. Variable in class IteGUI
regionModel. Variable in class IteGUI
resetUrl(). Method in class IteGUI
RuleNotFoundException(). Constructor for class logic.RuleNotFoundException
RuleNotFoundException(String). Constructor for class logic.RuleNotFoundException
rules. Variable in class logic.Invoker
Rules(). Constructor for class logic.Rules
ruleTable. Variable in class logic.Rules

S

setAttribute(Object). Method in class logic.Action
setAttributesFromTable(Hashtable). Method in class logic.Action
setDb(DataBank). Method in class URLProcessor
setTuple(Boolean[]). Method in class logic.BooleanTuple
setTuple(Vector). Method in class logic.BooleanTuple
setUrl(String). Method in class URLProcessor
This method receives one of the partial urls given as constants for this class, and creates a full url from it, and sets it in the url variable
size(). Method in class logic.BooleanTuple
sort(String[]). Static method in class IteGUI
Sorts Strings in the array arr and returns it in a new array.
SOUTH. Variable in class IteGUI
SOUTH_REGION. Static variable in class DataBank
status. Variable in class logic.Condition

T

toBooleanArray(Vector). Static method in class logic.Util
Returns an array of Booleans having length the parameter passed in; if any element of Vector parameter is not a Boolean, null is inserted into the array.
topBgColor. Variable in class IteGUI
toString(). Method in class logic.BooleanTuple
truthTable(int, int, int). Static method in class logic.BooleanTupleFactory
This function computes the truth value (true = 0, false = 1) that appears in a standard truth table having numStarCols propositional symbols, where starCol is the requested column index and row is the requested row index.
tuple. Variable in class logic.BooleanTuple

U

ud. Variable in class logic.Action
object on which some action must be performed
ud. Variable in class logic.Invoker
up. Variable in class IteGUI
updateVals. Variable in class logic.Action
When rules are executed, this a table of update values for the Updateable object is obtained and set here
url. Variable in class URLProcessor
this is the value that must be set by decideURL()
URL_STR. Static variable in class URLProcessor_good
URLProcessor(). Constructor for class URLProcessor
URLProcessor_bad(). Constructor for class URLProcessor_bad
URLProcessor_good(). Constructor for class URLProcessor_good
urlTextField. Variable in class IteGUI
userId. Variable in class DataBank
userId. Variable in class IteGUI
userIdModel. Variable in class IteGUI
Util(). Constructor for class logic.Util

W

WEST. Variable in class IteGUI
WEST_MEMBER_NOT_PRIVILEGED. Variable in class URLProcessor
WEST_MEMBER_PRIVILEGED. Variable in class URLProcessor
WEST_NONMEMBER_NOT_PRIVILEGED. Variable in class URLProcessor
WEST_NONMEMBER_PRIVILEGED. Variable in class URLProcessor
WEST_REGION. Static variable in class DataBank
westMembers. Variable in class DataBank