Revision 40793 branches/v02_desarrollo/libraries/sld/temp/org.gvsig.sldsupport.lib.impl/src/main/java/org/gvsig/sldsupport/impl/util/SLDUtils.java

View differences:

SLDUtils.java
132 132
		
133 133
	}
134 134
	
135
	/**
136
	 * Returns -1 if not parseable
137
	 */
138
	public static int parseInteger(String str) {
139
		
140
		int resp = -1;
141
		try {
142
			resp = Integer.parseInt(str);
143
		} catch (Exception ex) { }
144
		return resp;
145
	}
135 146
	
147
	/**
148
	 * Returns -1 if not parseable
149
	 */
150
	public static double parseDouble(String str) {
151
		
152
		double resp = -1;
153
		try {
154
			resp = Double.parseDouble(str);
155
		} catch (Exception ex) { }
156
		return resp;
157
	}
136 158
	
159
	
160
	
137 161
}

Also available in: Unified diff