public class CommonUtil extends Object
| Constructor and Description |
|---|
CommonUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generatorKey() |
static <T> T |
get(Map<String,T> carDtoMap,
String carId) |
static Integer |
getAgeByCertId(String certId) |
static Timestamp |
getCurrentTimestamp() |
static double |
getDistance(double lat_a,
double lng_a,
double lat_b,
double lng_b) |
static String |
getIp(javax.servlet.http.HttpServletRequest request) |
static boolean |
isEmpty(Object obj)
判断对象为空
|
static boolean |
isFalse(Boolean obj) |
static boolean |
isInteger(String str) |
static boolean |
isNotEmpty(Object obj)
判断对象不为空
|
static boolean |
isTrue(Boolean obj) |
static String |
like(String value) |
static void |
main(String[] args) |
static String |
random(int length) |
static String |
random(int length,
boolean upper) |
static Integer |
randomInt() |
static String |
randomInt(int length) |
static String |
randomInt(int length,
boolean startNotWithZero) |
static Integer |
randomIntOfInt(int length) |
static String |
rightLike(String value) |
static String |
stringToMD5(String plainText) |
static String |
uuid() |
public static double getDistance(double lat_a,
double lng_a,
double lat_b,
double lng_b)
public static String uuid()
public static String stringToMD5(String plainText) throws ValidException
ValidExceptionpublic static boolean isInteger(String str)
public static String random(int length)
public static Integer randomInt()
public static String random(int length, boolean upper)
public static String randomInt(int length)
public static String randomInt(int length, boolean startNotWithZero)
public static Integer randomIntOfInt(int length)
public static boolean isEmpty(Object obj)
obj - 对象名public static boolean isNotEmpty(Object obj)
obj - 对象名public static String generatorKey()
public static boolean isTrue(Boolean obj)
public static boolean isFalse(Boolean obj)
public static void main(String[] args)
public static String getIp(javax.servlet.http.HttpServletRequest request)
public static Timestamp getCurrentTimestamp()
Copyright © 2020. All rights reserved.