-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStringUtils.java
More file actions
30 lines (24 loc) · 777 Bytes
/
Copy pathStringUtils.java
File metadata and controls
30 lines (24 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package egovframework.api.admin.utils;
public class StringUtils {
public static boolean isNumeric(String string) {
if(string.equals("")){
return false;
}
return string.matches("-?\\d+(\\.\\d+)?");
}
public static String nvl(String value) {
return (value != null && value.length() > 0) ? value.trim() : "";
}
public static String nvl(String value, String replace) {
return (value != null && value.length() > 0) ? value.trim() : replace;
}
public static String nvl(Object value) {
return isNull(value) ? "" : String.valueOf(value);
}
public static String nvl(Object value, String replace) {
return isNull(value) ? replace : String.valueOf(value);
}
public static boolean isNull(Object value) {
return (value == null) ? true : false;
}
}