mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix comment
This commit is contained in:
@@ -1474,7 +1474,7 @@ public class CollUtil {
|
||||
/**
|
||||
* 是否包含{@code null}元素
|
||||
*
|
||||
* @param iterable 被检查的Iterable对象,如果为{@code null} 返回false
|
||||
* @param iterable 被检查的Iterable对象,如果为{@code null} 返回true
|
||||
* @return 是否包含{@code null}元素
|
||||
* @see IterUtil#hasNull(Iterable)
|
||||
* @since 3.0.7
|
||||
|
@@ -60,7 +60,7 @@ public class IterUtil {
|
||||
/**
|
||||
* 是否包含{@code null}元素
|
||||
*
|
||||
* @param iter 被检查的{@link Iterable}对象,如果为{@code null} 返回false
|
||||
* @param iter 被检查的{@link Iterable}对象,如果为{@code null} 返回true
|
||||
* @return 是否包含{@code null}元素
|
||||
*/
|
||||
public static boolean hasNull(Iterable<?> iter) {
|
||||
@@ -70,7 +70,7 @@ public class IterUtil {
|
||||
/**
|
||||
* 是否包含{@code null}元素
|
||||
*
|
||||
* @param iter 被检查的{@link Iterator}对象,如果为{@code null} 返回false
|
||||
* @param iter 被检查的{@link Iterator}对象,如果为{@code null} 返回true
|
||||
* @return 是否包含{@code null}元素
|
||||
*/
|
||||
public static boolean hasNull(Iterator<?> iter) {
|
||||
|
@@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 秒表封装<br>
|
||||
@@ -69,11 +68,6 @@ public class StopWatch {
|
||||
* 总运行时间
|
||||
*/
|
||||
private long totalTimeNanos;
|
||||
/**
|
||||
* 时间单位(支持三种单位:纳秒、毫秒、秒)
|
||||
*/
|
||||
private TimeUnit timeUnit = TimeUnit.NANOSECONDS;
|
||||
|
||||
// ------------------------------------------------------------------------------------------- Constructor start
|
||||
|
||||
/**
|
||||
@@ -131,17 +125,6 @@ public class StopWatch {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置时间单位,不设置默认是纳秒
|
||||
*
|
||||
* @param timeUnit 时间单位
|
||||
* @author 李显锋
|
||||
* @since 5.1.1
|
||||
*/
|
||||
public void setTimeUnit(TimeUnit timeUnit) {
|
||||
this.timeUnit = timeUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始默认的新任务
|
||||
*
|
||||
@@ -354,8 +337,8 @@ public class StopWatch {
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder(shortSummary());
|
||||
if (null == this.taskList) {
|
||||
for (TaskInfo task : getTaskInfo()) {
|
||||
if (null != this.taskList) {
|
||||
for (TaskInfo task : this.taskList) {
|
||||
sb.append("; [").append(task.getTaskName()).append("] took ").append(task.getTimeNanos()).append(" ns");
|
||||
long percent = Math.round(100.0 * task.getTimeNanos() / getTotalTimeNanos());
|
||||
sb.append(" = ").append(percent).append("%");
|
||||
|
Reference in New Issue
Block a user