Update ProductionRule.java

added isMatch()