Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
618ff639
Commit
618ff639
authored
Aug 12, 2024
by
Riegel
Browse files
Converted for each loop to explicit implementation. Ref
#69
parent
5ebd7188
Changes
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/parameter/ArgumentParser.java
View file @
618ff639
...
@@ -52,22 +52,20 @@ public class ArgumentParser {
...
@@ -52,22 +52,20 @@ public class ArgumentParser {
HashMap
<
String
,
List
<
String
>>
params
=
new
HashMap
<>();
HashMap
<
String
,
List
<
String
>>
params
=
new
HashMap
<>();
List
<
String
>
options
=
null
;
List
<
String
>
options
=
null
;
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
final
String
a
:
args
)
{
final
String
a
=
args
[
i
];
if
(
a
.
charAt
(
0
)
==
'-'
)
{
if
(
a
.
length
()
<
2
)
{
if
(
a
.
charAt
(
0
)
==
'-'
)
{
ErrorHandler
.
printHelpAndTerminate
(
"Error while parsing argument "
+
a
);
if
(
a
.
length
()
<
2
)
{
}
ErrorHandler
.
printHelpAndTerminate
(
"Error while parsing argument "
+
a
);
String
flag
=
a
.
substring
(
1
).
toLowerCase
();
}
options
=
new
ArrayList
<>();
String
flag
=
a
.
substring
(
1
).
toLowerCase
();
params
.
put
(
flag
,
options
);
options
=
new
ArrayList
<>();
}
else
if
(
options
!=
null
)
{
params
.
put
(
flag
,
options
);
options
.
add
(
a
);
}
else
if
(
options
!=
null
)
{
}
else
{
options
.
add
(
a
);
ErrorHandler
.
printHelpAndTerminate
(
"Illegal parameter usage at "
+
a
);
}
else
{
}
ErrorHandler
.
printHelpAndTerminate
(
"Illegal parameter usage at "
+
a
);
}
}
}
return
params
;
return
params
;
}
}
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/Table.java
View file @
618ff639
...
@@ -30,13 +30,13 @@ public class Table {
...
@@ -30,13 +30,13 @@ public class Table {
private
static
final
String
TABLE_HEADER_COLOR
=
"#58ACFA"
;
private
static
final
String
TABLE_HEADER_COLOR
=
"#58ACFA"
;
private
Element
tableBlock
;
private
final
Element
tableBlock
;
private
Element
tableHeader
;
private
final
Element
tableHeader
;
private
Element
tableBody
;
private
final
Element
tableBody
;
private
Element
tableElement
;
private
final
Element
tableElement
;
private
int
columns
;
private
final
int
columns
;
public
Table
(
int
columns
)
{
public
Table
(
int
columns
)
{
this
.
columns
=
columns
;
this
.
columns
=
columns
;
...
@@ -101,13 +101,13 @@ public class Table {
...
@@ -101,13 +101,13 @@ public class Table {
private
Element
createTableRow
(
String
...
content
)
{
private
Element
createTableRow
(
String
...
content
)
{
Element
tableRow
=
new
Element
(
"table-row"
,
PdfReport
.
FO_NS
);
Element
tableRow
=
new
Element
(
"table-row"
,
PdfReport
.
FO_NS
);
for
(
int
i
=
0
;
i
<
content
.
length
;
i
++
)
{
for
(
String
s
:
content
)
{
Element
tableCell
=
new
Element
(
"table-cell"
,
PdfReport
.
FO_NS
);
Element
tableCell
=
new
Element
(
"table-cell"
,
PdfReport
.
FO_NS
);
tableRow
.
addContent
(
tableCell
);
tableRow
.
addContent
(
tableCell
);
tableCell
.
addContent
(
PdfReport
.
createTextElement
(
content
[
i
]
));
tableCell
.
addContent
(
PdfReport
.
createTextElement
(
s
));
tableCell
.
setAttribute
(
"padding"
,
"3pt 3pt 3pt 3pt"
);
tableCell
.
setAttribute
(
"padding"
,
"3pt 3pt 3pt 3pt"
);
PdfReport
.
applySolidBorder
(
tableCell
);
PdfReport
.
applySolidBorder
(
tableCell
);
}
}
return
tableRow
;
return
tableRow
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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