Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
d525fa7f
Commit
d525fa7f
authored
Sep 09, 2020
by
Poulet Camille
Browse files
Solving error scanner.next
Compatibility between Linux and Windows on Java
parent
c0d107ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/environment/RIOBasinNetworkWithContinent.java
View file @
d525fa7f
...
...
@@ -381,21 +381,24 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
for
(
int
i
=
0
;
i
<
headers
.
length
;
i
++)
System
.
out
.
println
(
" "
+
fields
[
i
]
+
" \t<-> "
+
headers
[
i
]);
while
(
scanner
.
hasNext
())
{
basin_id
=
scanner
.
nextInt
();
// gid
name
=
scanner
.
next
();
function
=
scanner
.
next
();
while
(
scanner
.
hasNextLine
())
{
fields
=
scanner
.
nextLine
().
split
(
","
);
basin_id
=
Integer
.
valueOf
(
fields
[
0
]);
// gid
name
=
fields
[
1
];
function
=
fields
[
2
];
//System.out.println(basin_id + " " + name);
OffshoreBasin
offshorebasin
=
new
OffshoreBasin
(
basin_id
,
name
,
OffshoreBasinFunction
.
valueOf
(
function
));
if
(
mapOffshoreBasin
!=
null
)
{
if
(
mapOffshoreBasin
.
containsKey
(
name
.
s
tri
p
()))
{
if
(
mapOffshoreBasin
.
containsKey
(
name
.
tri
m
()))
{
// offshorebasin.getShape().append(mapInshoreBasin.get(name), true);
offshorebasin
.
setShape
(
mapOffshoreBasin
.
get
(
name
.
s
tri
p
()));
offshorebasin
.
setShape
(
mapOffshoreBasin
.
get
(
name
.
tri
m
()));
}
else
{
System
.
out
.
println
(
name
+
"does not exist in "
+
offshoreBasinShpFile
);
for
(
String
nameMap
:
mapOffshoreBasin
.
keySet
())
{
System
.
out
.
println
(
name
.
s
tri
p
()
+
":"
+
nameMap
+
"="
+
name
.
s
tri
p
().
equals
(
nameMap
));
System
.
out
.
println
(
name
.
tri
m
()
+
":"
+
nameMap
+
"="
+
name
.
tri
m
().
equals
(
nameMap
));
}
System
.
exit
(
1
);
...
...
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