/** * Same like next(), but returns the End-Of-Text as * if there was a linebreak added (Reader.readLine() compatible) * * @return The next position. */ public int nextWithEnd() { final int pos = this.position; if (pos == DONE) { return DONE; } if (pos == this.text.length) { this.position = DONE; return DONE; } final int retval = nextPosition(); if (retval == DONE) { return this.text.length; } return retval; }
/** * Same like next(), but returns the End-Of-Text as * if there was a linebreak added (Reader.readLine() compatible) * * @return The next position. */ public int nextWithEnd() { final int pos = this.position; if (pos == DONE) { return DONE; } if (pos == this.text.length) { this.position = DONE; return DONE; } final int retval = nextPosition(); if (retval == DONE) { return this.text.length; } return retval; }
/** * Same like next(), but returns the End-Of-Text as * if there was a linebreak added (Reader.readLine() compatible) * * @return The next position. */ public int nextWithEnd() { final int pos = this.position; if (pos == DONE) { return DONE; } if (pos == this.text.length) { this.position = DONE; return DONE; } final int retval = nextPosition(); if (retval == DONE) { return this.text.length; } return retval; }