Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swifteditor_java
Overview
Overview
Details
Activity
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
fukai
swifteditor_java
Commits
c3dcf39f
Commit
c3dcf39f
authored
Nov 12, 2019
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善数据结构,调用更加便捷
parent
df0f7758
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
SWFMessage.java
...ava/com/brilliace/swifteditor/tag/message/SWFMessage.java
+6
-4
ParseSwiftTest.java
src/test/java/com/brilliace/swifteditor/ParseSwiftTest.java
+3
-7
No files found.
src/main/java/com/brilliace/swifteditor/tag/message/SWFMessage.java
View file @
c3dcf39f
...
...
@@ -289,7 +289,9 @@ public class SWFMessage extends AbstractMessageArea {
return
true
;
}
}
else
{
if
(
setGenericRepetitive
((
AbstractMessageArea
)
item
,
index
,
ano
,
rs
,
cnt
))
{
if
(
parent
.
getType
()
==
MessageArea
.
SEQ
?
setGenericRepetitive
((
AbstractMessageArea
)
item
,
index
,
ano
,
(
List
)
rs
.
get
(
cnt
),
0
)
:
setGenericRepetitive
((
AbstractMessageArea
)
item
,
index
,
ano
,
rs
,
cnt
))
{
return
true
;
}
}
...
...
@@ -312,7 +314,7 @@ public class SWFMessage extends AbstractMessageArea {
MessageArea
cp
=
((
AbstractMessageArea
)
parent
).
getFields
().
get
(
0
);
//默认有一个组项
do
{
SEQList
tmp
=
(
SEQList
)
parent
;
setGenericRepetitive
((
AbstractMessageArea
)
cp
,
index
,
ano
,
tmp
.
getCyc
()
==
1
?
(
List
<
Object
>)
rs
.
get
(
cnt
)
:
rs
,
0
);
setGenericRepetitive
((
AbstractMessageArea
)
cp
,
index
,
ano
,
rs
,
cnt
);
if
(
rs
.
size
()
<=
++
cnt
)
return
true
;
try
{
...
...
@@ -450,8 +452,8 @@ public class SWFMessage extends AbstractMessageArea {
}
else
if
(((
TagLine
)
item
).
getTno
()
>
ano
)
{
break
;
}
}
else
if
(
item
.
getType
()
==
MessageArea
.
SEQ
)
{
if
(
parent
.
getType
()
==
MessageArea
.
SEQ
LIST
&&
((
SEQList
)
parent
).
getCyc
()
==
1
)
{
}
else
if
(
item
.
getType
()
==
MessageArea
.
CYCLIST
)
{
if
(
parent
.
getType
()
==
MessageArea
.
SEQ
)
{
List
<
Object
>
sec
=
new
LinkedList
<>();
rs
.
add
(
sec
);
getGenericRepetitive
((
AbstractMessageArea
)
item
,
index
,
ano
,
sec
);
...
...
src/test/java/com/brilliace/swifteditor/ParseSwiftTest.java
View file @
c3dcf39f
...
...
@@ -121,17 +121,13 @@ public class ParseSwiftTest extends TestCase {
assertEquals
(
swf
.
getGenericByNo
(
"1"
),
"STMMDL129058636E"
);
//填充101的循环的Sequence B的21域
List
<
Object
>
comList
=
new
LinkedList
<>();
List
<
String
>
one
=
new
LinkedList
<>();
one
.
add
(
"101651ATT000005W"
);
comList
.
add
(
one
);
one
=
new
LinkedList
<>();
one
.
add
(
"321651ATT000005Z"
);
comList
.
add
(
one
);
comList
.
add
(
"101651ATT000005W"
);
comList
.
add
(
"321651ATT000005Z"
);
swf
.
setGenericByNo
(
"10"
,
comList
);
assertEquals
(
swf
.
getGenericByNo
(
"10"
),
comList
);
//填充101的循环的Sequence B的23E循环域
comList
=
new
LinkedList
<>();
one
=
new
LinkedList
<>();
List
<
String
>
one
=
new
LinkedList
<>();
one
.
add
(
"CHQB/HELLO"
);
one
.
add
(
"CHQB/WORLD"
);
comList
.
add
(
one
);
...
...
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