mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
remove jmh
This commit is contained in:
@@ -4237,6 +4237,7 @@ public class CharSequenceUtil {
|
||||
/**
|
||||
* 以 conjunction 为分隔符将多个对象转换为字符串
|
||||
*
|
||||
* @param <T> 元素类型
|
||||
* @param conjunction 分隔符
|
||||
* @param iterable 集合
|
||||
* @return 连接后的字符串
|
||||
|
@@ -14,7 +14,6 @@ import org.openjdk.jmh.annotations.Threads;
|
||||
import org.openjdk.jmh.annotations.Warmup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -35,18 +34,16 @@ public class StrUtilJmh {
|
||||
@Benchmark
|
||||
public void joinJmh2() {
|
||||
final List<Org> orgs = initSize(20);
|
||||
final Iterator<Org> iterator = orgs.iterator();
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final int size = orgs.size();
|
||||
boolean isFirst = true;
|
||||
while (iterator.hasNext()) {
|
||||
for(int i = 0; i < size; i++){
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
sb.append(",");
|
||||
}
|
||||
|
||||
sb.append(iterator.next().getProvinceId());
|
||||
sb.append(orgs.get(i).getProvinceId());
|
||||
}
|
||||
sb.toString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user