@Override public int getStartLine() { if (!isValid()) { return 1; } return source.getLineNumber(getCharIndex()); }
@Override public int getStartColumn() { if (!isValid()) { return 1; } return source.getColumnNumber(getCharIndex()); }
@Override public int getEndColumn() { if (!isValid()) { return 1; } return source.getColumnNumber(getCharIndex() + Math.max(0, getCharLength() - 1)); }
@Override public CharSequence getCharacters() { if (!isValid()) { return ""; } return source.getCharacters().subSequence(getCharIndex(), getCharEndIndex()); }
@Override public int getEndLine() { if (!isValid()) { return 1; } return source.getLineNumber(getCharIndex() + Math.max(0, getCharLength() - 1)); }