1 15 package org.apache.hivemind.conditional; 16 17 import org.apache.hivemind.util.Defense; 18 19 25 public class PropertyEvaluator implements Evaluator 26 { 27 private String _propertyName; 28 29 public PropertyEvaluator(String propertyName) 30 { 31 Defense.notNull(propertyName, "propertyName"); 32 33 _propertyName = propertyName; 34 } 35 36 38 String getPropertyName() 39 { 40 return _propertyName; 41 } 42 43 46 public boolean evaluate(EvaluationContext context, Node node) 47 { 48 return context.isPropertySet(_propertyName); 49 } 50 51 } | Popular Tags |