1 19 20 25 26 package org.netbeans.modules.css.visual.model; 27 28 33 public class Utils { 34 35 public static boolean isInteger(String value){ 36 try{ 37 Integer.parseInt(value); 38 return true; 39 }catch(Exception exc){ 40 } 41 return false; 42 } 43 44 public static int getInteger(String strValue){ 45 if(strValue == null) return -1; 46 int value = -1; 47 try{ 48 value = Integer.parseInt(strValue); 49 return value; 50 }catch(Exception exc){ 51 } 52 return value; 53 } 54 55 } 56 | Popular Tags |