Text.java method index changed output format
This commit is contained in:
+6
-2
@@ -144,9 +144,13 @@ public class Text {
|
|||||||
ArrayList<Integer> values = entry.getValue();
|
ArrayList<Integer> values = entry.getValue();
|
||||||
String input = "";
|
String input = "";
|
||||||
if (values.get(0) >= 3) {
|
if (values.get(0) >= 3) {
|
||||||
input += key + " ";
|
input += key + " ";
|
||||||
for (int i = 1; i < values.size(); i++) {
|
for (int i = 1; i < values.size(); i++) {
|
||||||
input += values.get(i) + ", ";
|
if(i+1 == values.size()){
|
||||||
|
input += values.get(i)+"";
|
||||||
|
}else {
|
||||||
|
input += values.get(i) + ", ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
output.add(input);
|
output.add(input);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,6 +20,6 @@ public class TextTest {
|
|||||||
txt.add("Hallo, wie zusammen");
|
txt.add("Hallo, wie zusammen");
|
||||||
txt.add("Hallo,wie wie zusammen");
|
txt.add("Hallo,wie wie zusammen");
|
||||||
sListe= txt.index();
|
sListe= txt.index();
|
||||||
Assertions.assertEquals("Hallo 1, 2, 3, ",sListe.get(0));
|
Assertions.assertEquals("Hallo 1, 2, 3",sListe.get(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user