/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/util/SafeParsers.java
ViewVC logotype

Annotation of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/util/SafeParsers.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2838 - (hide annotations) (download)
Sun Jan 24 21:48:55 2016 UTC (8 years, 5 months ago) by torben
File size: 391 byte(s)
Add first working edition
1 torben 2838 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