/** * Get the specificity of this expression with respect to the supplied profile set. * * Iterates over this expressions list of {@link ExpressionToken}s calling * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities. * @param profileSet Evaluation Profile Set. * @return Specificity value of the expression for the supplied profile set. */ public double getSpecificity(ProfileSet profileSet) { double specificity = 0; // Only if the expression matches the device. if(isMatch(profileSet)) { for (int i = 0; i < expressionTokens.length; i++) { if(expressionTokens[i].isMatch(profileSet)) { specificity += expressionTokens[i].getSpecificity(profileSet); } } } return specificity; }
/** * Get the specificity of this expression with respect to the supplied profile set. * <p/> * Iterates over this expressions list of {@link ExpressionToken}s calling * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities. * @param profileSet Evaluation Profile Set. * @return Specificity value of the expression for the supplied profile set. */ public double getSpecificity(ProfileSet profileSet) { double specificity = 0; // Only if the expression matches the device. if(isMatch(profileSet)) { for (int i = 0; i < expressionTokens.length; i++) { if(expressionTokens[i].isMatch(profileSet)) { specificity += expressionTokens[i].getSpecificity(profileSet); } } } return specificity; }
/** * Get the specificity of this expression with respect to the supplied profile set. * <p/> * Iterates over this expressions list of {@link ExpressionToken}s calling * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities. * @param profileSet Evaluation Profile Set. * @return Specificity value of the expression for the supplied profile set. */ public double getSpecificity(ProfileSet profileSet) { double specificity = 0; // Only if the expression matches the device. if(isMatch(profileSet)) { for (int i = 0; i < expressionTokens.length; i++) { if(expressionTokens[i].isMatch(profileSet)) { specificity += expressionTokens[i].getSpecificity(profileSet); } } } return specificity; }
/** * Get the specificity of this expression with respect to the supplied profile set. * <p/> * Iterates over this expressions list of {@link ExpressionToken}s calling * {@link ExpressionToken#getSpecificity(org.milyn.profile.ProfileSet)} and adds up their specificities. * @param profileSet Evaluation Profile Set. * @return Specificity value of the expression for the supplied profile set. */ public double getSpecificity(ProfileSet profileSet) { double specificity = 0; // Only if the expression matches the device. if(isMatch(profileSet)) { for (int i = 0; i < expressionTokens.length; i++) { if(expressionTokens[i].isMatch(profileSet)) { specificity += expressionTokens[i].getSpecificity(profileSet); } } } return specificity; }