public function myPrint(StringW $s) { if ($s == NULL) { throw new NullPointerException(); } $index = 0; while ($index < $s->getLength()) { if ($this->isCurrentLineFull()) { $this->wrap2NewLine(); } $this->printer->printChar($s->charAt($index)); $this->charPerCurrentLine++; $index++; } }