Skip to main content
Typo
Source Link
AJNeufeld
  • 35.3k
  • 5
  • 41
  • 103

I’m not wild about the padWith(String), and restricting the string to a single character. Just keep the padWith(char) method.

You can separate columns with " | ", but you can’t specify a prefix or suffix, so you can’t make vertical lines at the left and right edges.

While we’re at it, it might be nice to have top/bottom lines possible, and perhaps a line after headings. But if you go too far down that rabbit hole, you’d probably want to call the callclass Table.

.print().addLine(…).print() has unexpected behaviour. I don’t see the point of allowing anything to chain after doing a print unless it clears the accumulated buffer. Perhaps it should be void.

I’m not wild about the padWith(String), and restricting the string to a single character. Just keep the padWith(char) method.

You can separate columns with " | ", but you can’t specify a prefix or suffix, so you can’t make vertical lines at the left and right edges.

While we’re at it, it might be nice to have top/bottom lines possible, and perhaps a line after headings. But if you go too far down that rabbit hole, you’d probably want to call the call Table.

.print().addLine(…).print() has unexpected behaviour. I don’t see the point of allowing anything to chain after doing a print unless it clears the accumulated buffer. Perhaps it should be void.

I’m not wild about the padWith(String), and restricting the string to a single character. Just keep the padWith(char) method.

You can separate columns with " | ", but you can’t specify a prefix or suffix, so you can’t make vertical lines at the left and right edges.

While we’re at it, it might be nice to have top/bottom lines possible, and perhaps a line after headings. But if you go too far down that rabbit hole, you’d probably want to call the class Table.

.print().addLine(…).print() has unexpected behaviour. I don’t see the point of allowing anything to chain after doing a print unless it clears the accumulated buffer. Perhaps it should be void.

Source Link
AJNeufeld
  • 35.3k
  • 5
  • 41
  • 103

I’m not wild about the padWith(String), and restricting the string to a single character. Just keep the padWith(char) method.

You can separate columns with " | ", but you can’t specify a prefix or suffix, so you can’t make vertical lines at the left and right edges.

While we’re at it, it might be nice to have top/bottom lines possible, and perhaps a line after headings. But if you go too far down that rabbit hole, you’d probably want to call the call Table.

.print().addLine(…).print() has unexpected behaviour. I don’t see the point of allowing anything to chain after doing a print unless it clears the accumulated buffer. Perhaps it should be void.