probs.addProbability(will_as, prob);
probs.addProbability(willState, prob);
    private void parseWhenActualStateIsElements(Element element, DiagnosisProbability probs, DiagnosisTechSpecImpl sensor) {                for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) {            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equalsIgnoreCase("WillDiagnoseAs") ) {                Element e = (Element) child;                String willState = e.getAttribute("name");                String p = e.getAttribute("withProbability");                                AssetState will_as = sensor.getStateDimension().findAssetState(willState);                if (will_as == null) {                    logger.error("Sensor Type XML Error - diagnosis asset state not found! unknown WillDiagnoseAs: "+willState+ " [AssetStateDimension="+sensor.getStateDimension()+"]for sensor = " + sensor.getName());                    return;                }                                try {                    float prob = Float.parseFloat(p);                    probs.addProbability(will_as, prob);                } catch (Exception ex) {                    logger.warn("SensorType XML Error for ["+sensor.getName()+"]- Bad float in probability for ["+probs.getActualState()+"]: " + p);                    continue; // ignore this one & move on.                }            } //else, likely a text element - ignore        }    }