java.lang.Object
com.tlcsdm.core.util.CoreUtil
工具包
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Object深度克隆static <T> BinaryOperator<T> static StringgetDomainName(String url) 从url中获取域名.static String获取项目根目录 eclipse下的根目录和idea不同static String获取运行位置下runtime文件夹.static String获取当前workEnv.static boolean类是否存在,存在返回true.static booleanisStartupFromJar(Class<?> clazz) 判断类是否在jar中static <T,F> Map <F, T> list 转换 map.static <T,F> Map <F, T> list 转换 map.static intnewHashMapWithExpectedSize(int expectedSize) 根据容量获取map初始大小, 参考JDK8中putAll方法中的实现以及guava的newHashMapWithExpectedSize方法static void使用默认浏览器打开urlstatic String读取 InputStream 到 String字符串中.static voidsortByOrder(List<Class<?>> list) 根据Order注解排序 不存在注解则排到最后static StringtoLowerCase4Index(String string) 首字母小写static chartoUpperCase(char chars) 字符转成大写static StringtoUpperCase4Index(String string) 首字母大写static StringObject为null时, toString()会返回 "null".
-
构造器详细资料
-
CoreUtil
private CoreUtil()
-
-
方法详细资料
-
valueOf
Object为null时, toString()会返回 "null". 本方法会在Object为null时返回空串. -
toLowerCase4Index
首字母小写 -
toUpperCase4Index
首字母大写 -
toUpperCase
public static char toUpperCase(char chars) 字符转成大写 -
newHashMapWithExpectedSize
public static int newHashMapWithExpectedSize(int expectedSize) 根据容量获取map初始大小, 参考JDK8中putAll方法中的实现以及guava的newHashMapWithExpectedSize方法- 参数:
expectedSize- 容量大小
-
deepClone
深度克隆 -
openWeb
使用默认浏览器打开url -
sortByOrder
根据Order注解排序 不存在注解则排到最后 -
getRootPath
获取项目根目录 eclipse下的根目录和idea不同 -
getRuntimePath
获取运行位置下runtime文件夹. -
isStartupFromJar
判断类是否在jar中 -
hasClass
类是否存在,存在返回true. -
getDomainName
从url中获取域名. -
getWorkEnv
获取当前workEnv. 虚拟机参数workEnv为空时,如果当前在jar包启动则时生产环境,否则认为是开发环境 -
readStream
读取 InputStream 到 String字符串中. -
listToMap
list 转换 map.- 参数:
list-keyMapper-
-
listToMap
public static <T,F> Map<F,T> listToMap(List<T> list, Function<T, F> keyMapper, Consumer<T> consumer, Predicate<T> filter) list 转换 map.- 参数:
list-keyMapper-consumer-filter-
-
defaultMegerFunction
- 返回:
- deafult meger function
-