public class Check extends Object
┌─┐ ┌─┐
┌──┘ ┴───────┘ ┴──┐
│ │
│ ─── │
│ ─┬┘ └┬─ │
│ │
│ ─┴─ │
│ │
└───┐ ┌───┘
│ │
│ │
│ │
│ └──────────────┐
│ │
│ ├─┐
│ author:lelouch ┌─┘
│ │
└─┐ ┐ ┌───────┬──┐ ┌──┘
│ ─┤ ─┤ │ ─┤ ─┤
└──┴──┘ └──┴──┘
神兽保佑
代码无BUG!
| 构造器和说明 |
|---|
Check() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
ellipsis(String text,
int length)
字符串截取
|
static boolean |
equalsChinese(String v1,
String v2)
Equals chinese boolean.
|
static String |
filterHtml(String html)
过滤掉html 只显示文本
|
static String |
filterHtml2(String html)
过滤掉html 只显示文本(保留p,img)
|
static String |
getProperty(String property)
Gets the system property indicated by the specified key.
|
static String |
getSplitFirst(String value)
Gets split first.
|
static boolean |
is64bit()
判断是否是64bit
|
static boolean |
isBigDecimal(String value)
Is big decimal boolean.
|
static boolean |
isBigInteger(String value)
Is big integer boolean.
|
static boolean |
isBoolean(String value)
Is boolean boolean.
|
static boolean |
isDateString(String value)
是date(yyyy-MM-dd)
|
static boolean |
isDateString2(String value)
是 date(yyyy/MM/dd)
|
static boolean |
isDouble(String value)
Double校验
|
static boolean |
isFile(File file)
Is file boolean.
|
static boolean |
isInteger(String value)
整数校验
|
static boolean |
isJar(Class classes)
程序是否跑在jar里
|
static boolean |
isLong(String value)
Is long boolean.
|
static boolean |
isMysqldate(String date)
Is mysqldate boolean.
|
static boolean |
isNotNULL_MapKey(Map m,
Object value)
已过时。
|
static boolean |
isNotNULL(Object value)
已过时。
|
static boolean |
isUrl(String str)
Is url boolean.
|
static boolean |
isValid_MapKey(Map m,
Object value)
Is valid map key boolean.
|
static boolean |
isValid(Map<?,?> value)
Is valid boolean.
|
static boolean |
isValid(Object value)
验证 object 是否是有效数据
|
static boolean |
isWindows()
判断是否是windows
|
static boolean |
matches(Pattern p,
CharSequence input)
是否匹配
|
static boolean |
matches(String regex,
CharSequence input)
是否匹配
|
static String |
nullchange(String value)
null to ""
|
static String |
stringToUnicode(String string)
字符串转换unicode
|
static String |
trim(String value)
去首尾空格【全角、半角, 】
|
public static boolean isWindows()
public static String getProperty(String property)
property - the propertypublic static boolean isInteger(String value)
value - the valuepublic static boolean isBoolean(String value)
value - the valuepublic static boolean isDouble(String value)
value - the valuepublic static boolean isLong(String value)
value - the valuepublic static boolean isBigDecimal(String value)
value - the valuepublic static boolean isBigInteger(String value)
value - the valuepublic static boolean isUrl(String str)
str - the strpublic static boolean isValid(Map<?,?> value)
value - the valuepublic static boolean isNotNULL_MapKey(Map m, Object value)
m - the mvalue - the valuepublic static boolean isValid_MapKey(Map m, Object value)
m - the mvalue - the valuepublic static boolean isNotNULL(Object value)
value - the valuepublic static boolean isValid(Object value)
value - the valuepublic static boolean isFile(File file)
file - the filepublic static boolean isJar(Class classes)
classes - the classespublic static boolean is64bit()
public static String stringToUnicode(String string)
string - the stringpublic static String nullchange(String value)
value - the valuepublic static boolean isMysqldate(String date)
date - the datepublic static String ellipsis(String text, int length)
text - the textlength - the lengthpublic static boolean isDateString(String value)
value - the valuepublic static String getSplitFirst(String value)
value - the valuepublic static String filterHtml(String html)
html - the htmlpublic static String filterHtml2(String html)
html - the htmlpublic static boolean matches(String regex, CharSequence input)
regex - The expression to be compiled (org.lelouch.tools.Regexs)input - The character sequence to be matchedpublic static boolean matches(Pattern p, CharSequence input)
p - the pinput - The character sequence to be matchedpublic static boolean isDateString2(String value)
value - the valuepublic static boolean equalsChinese(String v1, String v2) throws UnsupportedEncodingException
v1 - the v 1v2 - the v 2UnsupportedEncodingExceptionCopyright © 2020. All rights reserved.