public static double parseDouble(String val) { /* if (val == null) return 0.0; double retVal = 0.0; try { retVal = Double.parseDouble(val); } catch (Exception e) {} return retVal; */ return findDouble(val); }
public static float parseFloat(String val) { /* if (val == null) return 0f; float retVal = 0f; try { retVal = Float.parseFloat(val); } catch (Exception e) {} return retVal; */ return findFloat(val); }
public int getIntValue() { return XMLParseUtil.findInt(stringValue); }
if (strn != null) if (XMLParseUtil.isDouble(strn)) fromValue = XMLParseUtil.parseDouble(strn); if (strn != null) if (XMLParseUtil.isDouble(strn)) toValue = XMLParseUtil.parseDouble(strn); try if (strn != null) byValue = XMLParseUtil.parseDouble(strn); } catch (Exception e) {} try if (strn != null) valuesValue = XMLParseUtil.parseDoubleList(strn); } catch (Exception e) {}
public float[] getFloatList() { return XMLParseUtil.parseFloatList(stringValue); }
public double[] getDoubleList() { return XMLParseUtil.parseDoubleList(stringValue); }
/** * The input string represents a ratio. Can either be specified as a * double number on the range of [0.0 1.0] or as a percentage [0% 100%] */ public static double parseRatio(String val) { if (val == null || val.equals("")) return 0.0; if (val.charAt(val.length() - 1) == '%') { parseDouble(val.substring(0, val.length() - 1)); } return parseDouble(val); }
public static Object[] getElementArray(Class classType, Element root, String name, URL docRoot) { if (root == null) return null; //Do not process if not a LoadableObject if (!ReadableXMLElement.class.isAssignableFrom(classType)) { return null; } LinkedList elementCache = getElementLinkedList(classType, root, name, docRoot); Object[] retArr = (Object[])Array.newInstance(classType, elementCache.size()); return elementCache.toArray(retArr); }
public int[] getIntList() { return XMLParseUtil.parseIntList(stringValue); }
String keyVal = getAttribString(ele, key); retMap.put(keyVal, newObj);
if (strn != null) if (XMLParseUtil.isDouble(strn)) fromValue = XMLParseUtil.parseDouble(strn); if (strn != null) if (XMLParseUtil.isDouble(strn)) toValue = XMLParseUtil.parseDouble(strn); try if (strn != null) byValue = XMLParseUtil.parseDouble(strn); } catch (Exception e) {} try if (strn != null) valuesValue = XMLParseUtil.parseDoubleList(strn); } catch (Exception e) {}
public float[] getFloatList() { return XMLParseUtil.parseFloatList(stringValue); }
public double[] getDoubleList() { return XMLParseUtil.parseDoubleList(stringValue); }
/** * The input string represents a ratio. Can either be specified as a * double number on the range of [0.0 1.0] or as a percentage [0% 100%] */ public static double parseRatio(String val) { if (val == null || val.equals("")) return 0.0; if (val.charAt(val.length() - 1) == '%') { parseDouble(val.substring(0, val.length() - 1)); } return parseDouble(val); }
public static Object[] getElementArray(Class classType, Element root, String name, URL docRoot) { if (root == null) return null; //Do not process if not a LoadableObject if (!ReadableXMLElement.class.isAssignableFrom(classType)) { return null; } LinkedList elementCache = getElementLinkedList(classType, root, name, docRoot); Object[] retArr = (Object[])Array.newInstance(classType, elementCache.size()); return elementCache.toArray(retArr); }
public int[] getIntList() { return XMLParseUtil.parseIntList(stringValue); }
String keyVal = getAttribString(ele, key); retMap.put(keyVal, newObj);
if (strn != null) if (XMLParseUtil.isDouble(strn)) fromValue = XMLParseUtil.parseDouble(strn); if (strn != null) if (XMLParseUtil.isDouble(strn)) toValue = XMLParseUtil.parseDouble(strn); try if (strn != null) byValue = XMLParseUtil.parseDouble(strn); } catch (Exception e) {} try if (strn != null) valuesValue = XMLParseUtil.parseDoubleList(strn); } catch (Exception e) {}
public float[] getFloatList() { return XMLParseUtil.parseFloatList(stringValue); }
public static float parseFloat(String val) { /* if (val == null) return 0f; float retVal = 0f; try { retVal = Float.parseFloat(val); } catch (Exception e) {} return retVal; */ return findFloat(val); }