Update Expression.java

Added replaceLeaves(), creates a new Expression with the leaves of the source replaced by the node at the corresponding position of input.

Added isApplicable(), calls replaceLeaves to put the input expression in "theorem form". Then compares the input to the new expression: if equal, then the theorem is properly called. If not, the theorem doesn't apply to the called expression.

changed ExpHelper to better deal with one or more ~ operators.

changed ExpNode -- String myItem instead of Object myItem.

Bug warning -- Make sure to use str.substring() instead of charAt(i) when setting myItem and call string instead of char methods to get and set myItem.
Merge pull request #9 from chashemi/patch-7

CH: Update Expression.java