Frames No Frames

  %method %block %branch %line
net.jaekl.qd.util.ParseUtils
67%(2/3)
91%(10/11)
100%(8/8)
91%(10/11)

hit count method name method modifiers method signature
0 <init> [public] void <init>()
44 parseDouble [public, static] double parseDouble(java.lang.String)
17 parseInt [public, static] int parseInt(java.lang.String)

 1  
 package net.jaekl.qd.util;
 2  
 
 3  Block: 0/1 
 public class ParseUtils {
 4  
 	// Attempt to parse the string as a double.
 5  
 	// Treat errors as a zero value.
 6  
 	public static double parseDouble(String string) {
 7  Block: 1/1 
 		if ((null == string) || ("".equals(string))) {
 8  Block: 1/1 Branch: 2/2 
 			return 0.0;
 9  
 		}
 10  
 		try {
 11  Block: 1/1 Branch: 1/1 
 			return Double.parseDouble(string);
 12  
 		}
 13  Block: 1/1 
 		catch (NumberFormatException exc) {
 14  
 			return 0.0;
 15  
 		}
 16  
 	}
 17  
 	
 18  
 	public static int parseInt(String string) {
 19  Block: 1/1 
 		if ((null == string) || ("".equals(string))) {
 20  Block: 1/1 Branch: 2/2 
 			return 0;
 21  
 		}
 22  
 		try {
 23  Block: 1/1 Branch: 1/1 
 			return Integer.parseInt(string);
 24  
 		}
 25  Block: 1/1 
 		catch (NumberFormatException exc) {
 26  
 			return 0;
 27  
 		}
 28  
 		
 29  
 	}
 30  
 }

Report generated 11/12/14 11:31 PM