public class CommonUtils
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
private static int |
caseDiff |
private static java.util.BitSet |
dontNeedEncoding |
限定符 | 构造器和说明 |
---|---|
private |
CommonUtils() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
empty(java.io.File file) |
static boolean |
empty(java.util.Map<?,?> value) |
static boolean |
empty(java.lang.Number value) |
static boolean |
empty(java.lang.Object[] value) |
static boolean |
empty(java.lang.String value) |
static java.lang.String |
encodeURI(java.lang.String s) |
static java.lang.String |
getConfig(java.util.Properties config,
java.lang.String key) |
static java.util.Date |
getDate() |
static java.util.Date |
getMinuteDate() |
static <T> java.lang.String |
joinString(T... elements) |
static java.lang.String |
keep(java.lang.String string,
int length) |
static java.lang.String |
keep(java.lang.String string,
int length,
java.lang.String append) |
static <T,F> java.util.Map<F,T> |
listToMap(java.util.List<T> list,
java.util.function.Function<T,F> keyMapper) |
static <T,F> java.util.Map<F,T> |
listToMap(java.util.List<T> list,
java.util.function.Function<T,F> keyMapper,
java.util.function.Consumer<T> consumer,
java.util.function.Predicate<T> filter) |
static boolean |
notEmpty(java.util.Collection<?> value) |
static boolean |
notEmpty(java.io.File file) |
static boolean |
notEmpty(java.util.Map<?,?> value) |
static boolean |
notEmpty(java.lang.Number value) |
static boolean |
notEmpty(java.lang.Object[] value) |
static boolean |
notEmpty(java.lang.String value) |
static boolean |
notEmpty(java.lang.String[] value) |
private static java.util.BitSet dontNeedEncoding
private static final int caseDiff
public static <T,F> java.util.Map<F,T> listToMap(java.util.List<T> list, java.util.function.Function<T,F> keyMapper)
T
- F
- list
- keyMapper
- public static <T,F> java.util.Map<F,T> listToMap(java.util.List<T> list, java.util.function.Function<T,F> keyMapper, java.util.function.Consumer<T> consumer, java.util.function.Predicate<T> filter)
T
- F
- list
- keyMapper
- consumer
- filter
- public static java.lang.String encodeURI(java.lang.String s)
@SafeVarargs public static <T> java.lang.String joinString(T... elements)
elements
- public static java.lang.String keep(java.lang.String string, int length)
string
- length
- public static java.lang.String keep(java.lang.String string, int length, java.lang.String append)
string
- length
- append
- public static java.util.Date getDate()
public static java.util.Date getMinuteDate()
public static boolean notEmpty(java.lang.String value)
value
- public static boolean empty(java.lang.String value)
value
- public static boolean notEmpty(java.lang.Number value)
value
- public static boolean empty(java.lang.Number value)
value
- public static boolean empty(java.util.Map<?,?> value)
value
- public static boolean notEmpty(java.util.Collection<?> value)
value
- public static boolean notEmpty(java.util.Map<?,?> value)
value
- public static boolean notEmpty(java.io.File file)
file
- public static boolean empty(java.io.File file)
file
- public static boolean notEmpty(java.lang.String[] value)
value
- public static boolean notEmpty(java.lang.Object[] value)
value
- public static boolean empty(java.lang.Object[] value)
value
- public static java.lang.String getConfig(java.util.Properties config, java.lang.String key)