Here you can find the source of getPropertyDouble(Properties p, String key)
Parameter | Description |
---|---|
p | non-null properties |
key | non-null id of an existing key |
Parameter | Description |
---|---|
NumberFormatException | if the value is not a number |
public static double getPropertyDouble(Properties p, String key)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**//from w w w . j a va 2 s .c o m * convert a properties value into an int * @param p non-null properties * @param key non-null id of an existing key * @return double value - MIN_VALUE if the key does not exist * @throws NumberFormatException if the value is not a number */ public static double getPropertyDouble(Properties p, String key) { Object test = p.get(key); if (test == null) return (Double.MIN_VALUE); return (Double.parseDouble(test.toString())); } /**{ method @name toString @function convert a char to a string @param c the char @return the String }*/ public static String toString(char c) { StringBuffer s = new StringBuffer(); s.append(c); return (s.toString()); } }