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
ac25268e
Commit
ac25268e
authored
May 13, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复等待时间
parent
cb5d8380
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
CollectionString.java
...main/java/com/yanzuoguang/util/base/CollectionString.java
+4
-4
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/base/CollectionString.java
View file @
ac25268e
...
...
@@ -69,13 +69,13 @@ public class CollectionString {
// 每个字段的长度
Map
<
String
,
Integer
>
mapFieldCount
=
new
LinkedHashMap
<>(
15
);
// 每个值的长度
rowList
.
forEach
(
k
->
ObjectEach
.
each
(
k
,
(
name
,
value
,
field
)
->
{
rowList
.
forEach
(
row
->
ObjectEach
.
each
(
row
,
(
rowFieldName
,
rowFieldValue
,
rowFieldInfo
)
->
{
// 获取字符串
String
val
=
StringHelper
.
getFirst
(
StringHelper
.
toString
(
v
alue
));
String
val
=
StringHelper
.
getFirst
(
StringHelper
.
toString
(
rowFieldV
alue
));
int
len
=
length
(
val
);
Integer
hisLen
=
mapFieldCount
.
getOrDefault
(
n
ame
,
len
);
Integer
hisLen
=
mapFieldCount
.
getOrDefault
(
rowFieldN
ame
,
len
);
int
maxLen
=
Math
.
max
(
len
,
hisLen
);
mapFieldCount
.
put
(
n
ame
,
maxLen
);
mapFieldCount
.
put
(
rowFieldN
ame
,
maxLen
);
}));
return
mapFieldCount
;
}
...
...
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