/* * (non-Javadoc) Method declared in IMemento. */ public Integer getInteger(String key) { Attr attr = element.getAttributeNode(key); if (attr == null) { return null; } String strValue = attr.getValue(); try { return new Integer(strValue); } catch (NumberFormatException e) { CoreEPLPlugin.log( "Memento problem - invalid integer for key: " + key //$NON-NLS-1$ + " value: " + strValue, e); //$NON-NLS-1$ return null; } }
/* * (non-Javadoc) Method declared in IMemento. */ public Float getFloat(String key) { Attr attr = element.getAttributeNode(key); if (attr == null) { return null; } String strValue = attr.getValue(); try { return new Float(strValue); } catch (NumberFormatException e) { CoreEPLPlugin.log( "Memento problem - Invalid float for key: " //$NON-NLS-1$ + key + " value: " + strValue, e); //$NON-NLS-1$ return null; } }