Pandora
Class NDRuleController

java.lang.Object
  extended by Pandora.NDRuleController

public class NDRuleController
extends java.lang.Object

Implements the correct NDRule when a first line and a rule have been selected.


Constructor Summary
NDRuleController(java.lang.String rule, ProofLine firstLine, ProofBox proof)
          Constructs a NDRuleController.
 
Method Summary
 void addLine(ProofLine line)
          Adds the given ProofLine to the proof as extra input.
 void apply()
          Called by RuleController to apply the RAPRule.
 boolean haveAll()
          Returns true if the rule has all of the required input lines.
 void initialise()
          Called by RuleController to add the first line to the rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NDRuleController

public NDRuleController(java.lang.String rule,
                        ProofLine firstLine,
                        ProofBox proof)
Constructs a NDRuleController.

Parameters:
rule - String representing the selected Rule
firstLine - the ProofLine which has been selected
proof - the ProofBox which contains the selected line
Method Detail

initialise

public void initialise()
                throws java.lang.Exception
Called by RuleController to add the first line to the rule.

Throws:
java.lang.Exception

haveAll

public boolean haveAll()
Returns true if the rule has all of the required input lines.


apply

public void apply()
           throws java.lang.Exception
Called by RuleController to apply the RAPRule.

Throws:
java.lang.Exception

addLine

public void addLine(ProofLine line)
             throws java.lang.Exception
Adds the given ProofLine to the proof as extra input.

Parameters:
line - the ProofLine to be added to the proof
Throws:
java.lang.Exception