startHrs = Integer.parseInt(start);
if (start.length() <= 2) { startHrs = 0; startMin = Integer.parseInt(start); } else if (start.length() == 3) { startHrs = Integer.parseInt(start.substring(0,1) ); startMin = Integer.parseInt(start.substring(1,3) ); } else if (start.length() == 4) { startHrs = Integer.parseInt(start.substring(0,2) ); startMin = Integer.parseInt(start.substring(2,4) ); } else { logger.error("intervalStart too large ["+start+"]in ClockInterval element. Must be between 0000-2359. Returning null EventProbabilityInterval."); return null; } if (startHrs > 23 ) { logger.error("intervalStart hrs too large ["+start+"]in ClockInterval element. Must be between 0-23. Returning null EventProbabilityInterval."); return null; } if (startMin > 59) { logger.error("intervalStart min too large ["+start+"]in ClockInterval element. Must be between 0-59. Returning null EventProbabilityInterval."); return null; }
    protected static EventProbabilityInterval parseInterval(Element element, Hashtable map) {                //Read the map value        String start = element.getAttribute("intervalStart");        String dur = element.getAttribute("durationHrs");        String probStr    = element.getAttribute("probability");       //Map probability String to a float.        float fProb = 0;        if (map != null) {            Float f = (Float) map.get(probStr);            if (f != null) {                fProb = f.floatValue();            } else {                logger.warn("Could not find probability map entry for "+probStr+". Setting value to 0.");            }        }                int startHrs = 0;        int durHrs = 0;                try {                        startHrs = Integer.parseInt(start);            durHrs = Integer.parseInt(dur);                    } catch (Exception e) {            logger.warn("Parsing error. Integer conversion error for intervalStart["+start+"] or durationHrs["+dur+"]");                        return null;        }                 EventProbabilityInterval pi = new EventProbabilityInterval( startHrs, durHrs, fProb );        return pi;            }    