/** * 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; }
/** * Does this expression match one of the profiles in the supplied profile set. * @param profileSet Profile set. * @return True if this expression matches one of the profiles in the supplied * profile set, otherwise false. */ public boolean isMatch(ProfileSet profileSet) { for (int i = 0; i < expressionTokens.length; i++) { if(!expressionTokens[i].isMatch(profileSet)) { return false; } } return true; }
/** * Does this expression match one of the profiles in the supplied profile set. * @param profileSet Profile set. * @return True if this expression matches one of the profiles in the supplied * profile set, otherwise false. */ public boolean isMatch(ProfileSet profileSet) { for (int i = 0; i < expressionTokens.length; i++) { if(!expressionTokens[i].isMatch(profileSet)) { return false; } } return true; }
/** * Does this expression match one of the profiles in the supplied profile set. * @param profileSet Profile set. * @return True if this expression matches one of the profiles in the supplied * profile set, otherwise false. */ public boolean isMatch(ProfileSet profileSet) { for (int i = 0; i < expressionTokens.length; i++) { if(!expressionTokens[i].isMatch(profileSet)) { return false; } } return true; }
/** * Does this expression match one of the profiles in the supplied profile set. * @param profileSet Profile set. * @return True if this expression matches one of the profiles in the supplied * profile set, otherwise false. */ public boolean isMatch(ProfileSet profileSet) { for (int i = 0; i < expressionTokens.length; i++) { if(!expressionTokens[i].isMatch(profileSet)) { return false; } } return true; }