mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
时间格式化工具支持自定义设置单位
This commit is contained in:
parent
bf19e86f4e
commit
47872765e3
@ -222,7 +222,7 @@ public class BetweenFormatter implements Serializable {
|
||||
* @param levelFormatter 级别格式化器
|
||||
* @return this
|
||||
*/
|
||||
public BetweenFormatter setLevelFormatter(Function<Level, String> levelFormatter) {
|
||||
public BetweenFormatter setLevelFormatter(final Function<Level, String> levelFormatter) {
|
||||
this.levelFormatter = levelFormatter;
|
||||
return this;
|
||||
}
|
||||
@ -233,8 +233,8 @@ public class BetweenFormatter implements Serializable {
|
||||
* @param separator 分割符
|
||||
* @return this
|
||||
*/
|
||||
public BetweenFormatter setSeparator(String separator) {
|
||||
this.separator = separator == null ? StrUtil.EMPTY : separator;
|
||||
public BetweenFormatter setSeparator(final String separator) {
|
||||
this.separator = StrUtil.emptyIfNull(separator);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
package org.dromara.hutool.core.date;
|
||||
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user