/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/util/SafeParsers.java |
Parent Directory | Revision Log
Add first working edition
1 | package dk.daoas.adressevedligehold.util; |
2 | |
3 | public class SafeParsers { |
4 | public static short parseShort(String input) { |
5 | try { |
6 | return Short.parseShort(input); |
7 | } catch (NumberFormatException nfe) { |
8 | return 0; |
9 | } |
10 | } |
11 | |
12 | public static int parseInt(String input) { |
13 | try { |
14 | return Integer.parseInt(input); |
15 | } catch (NumberFormatException nfe) { |
16 | return 0; |
17 | } |
18 | } |
19 | } |
ViewVC Help | |
Powered by ViewVC 1.1.20 |