Skip to content

Commit 0b69e07

Browse files
committed
chore: minor improvements to Size
1 parent 2cac060 commit 0b69e07

File tree

1 file changed

+7
-0
lines changed
  • src/main/java/org/codejive/context/terminal

1 file changed

+7
-0
lines changed

src/main/java/org/codejive/context/terminal/Size.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ public class Size {
55
private final int height;
66

77
public Size(int width, int height) {
8+
assert width >= 0;
9+
assert height >= 0;
810
this.width = width;
911
this.height = height;
1012
}
@@ -16,4 +18,9 @@ public int width() {
1618
public int height() {
1719
return height;
1820
}
21+
22+
@Override
23+
public String toString() {
24+
return width + "x" + height;
25+
}
1926
}

0 commit comments

Comments
 (0)