Added formatRaw option in method print.
This commit is contained in:
+23
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user