@Override
	public String toString() {
		StringBuilder s = new StringBuilder();
		
		final int maxCol = maxCol();

		// initial line
		s.append('+');
		for (int i = 0; i <= maxCol; i++)
			s.append('-');
		s.append("+\n");

		// cells
		for (IntSet row : rows) {
			s.append('|');
			int col = 0;
			if (row != null) {
				IntIterator itr = row.iterator();
				while (itr.hasNext()) {
					int c = itr.next();
					while (col++ < c)
						s.append(' ');
					s.append('*');
				}
			}
			while (col++ <= maxCol)
				s.append(' ');
			s.append("|\n");
		}

		// final line
		s.append('+');
		for (int i = 0; i <= maxCol; i++)
			s.append('-');
		s.append("+\n");
		
		return s.toString();
	}