Added formatRaw option in method print.

This commit is contained in:
Leonardo Brandenberger
2021-11-05 08:35:49 +01:00
parent 60d877a968
commit 53534be4b3
3 changed files with 27 additions and 3 deletions
+23 -2
View File
@@ -1,7 +1,28 @@
import java.util.ArrayList;
public class SystemOut {
private boolean formatRaw;
private int columnWidth;
public class SystemOut{
public void print(ArrayList text) {
if (formatRaw) {
for(int counter = 0; counter < text.size(); counter++) {
System.out.println("<" + counter + ">: <" + text.get(counter) + ">");
}
}
else {
}
}
public void formatRaw() {
formatRaw = true;
}
public void formatFix(int length) {
formatRaw = false;
columnWidth = length;
}
}