Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
cb5d8380
Commit
cb5d8380
authored
May 13, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复等待时间
parent
29bb39f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
CollectionString.java
...main/java/com/yanzuoguang/util/base/CollectionString.java
+19
-19
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/base/CollectionString.java
View file @
cb5d8380
...
@@ -58,25 +58,6 @@ public class CollectionString {
...
@@ -58,25 +58,6 @@ public class CollectionString {
return
sbResult
.
toString
();
return
sbResult
.
toString
();
}
}
/**
* 删除为0的长度,并将列名长度写入
*
* @param mapFieldCount
*/
private
static
void
initColumnNameLength
(
Map
<
String
,
Integer
>
mapFieldCount
)
{
// 添加到另外一个集合,防止遍历列名通知执行删除时出错
List
<
String
>
keys
=
new
ArrayList
<>(
mapFieldCount
.
keySet
());
keys
.
forEach
(
key
->
{
int
len
=
mapFieldCount
.
get
(
key
);
if
(
len
==
0
)
{
mapFieldCount
.
remove
(
key
);
}
else
{
int
maxLen
=
Math
.
max
(
len
,
length
(
key
));
mapFieldCount
.
put
(
key
,
maxLen
);
}
});
}
/**
/**
* 获取值字段的长度
* 获取值字段的长度
*
*
...
@@ -99,6 +80,25 @@ public class CollectionString {
...
@@ -99,6 +80,25 @@ public class CollectionString {
return
mapFieldCount
;
return
mapFieldCount
;
}
}
/**
* 删除为0的长度,并将列名长度写入
*
* @param mapFieldCount
*/
private
static
void
initColumnNameLength
(
Map
<
String
,
Integer
>
mapFieldCount
)
{
// 添加到另外一个集合,防止遍历列名通知执行删除时出错
List
<
String
>
keys
=
new
ArrayList
<>(
mapFieldCount
.
keySet
());
keys
.
forEach
(
key
->
{
int
len
=
mapFieldCount
.
get
(
key
);
if
(
len
==
0
)
{
mapFieldCount
.
remove
(
key
);
}
else
{
int
maxLen
=
Math
.
max
(
len
,
length
(
key
));
mapFieldCount
.
put
(
key
,
maxLen
);
}
});
}
/**
/**
* 添加空行
* 添加空行
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment