Skip to content

Commit

Permalink
Add useful toString to all version iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Nov 19, 2024
1 parent 8111aeb commit d4ee515
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,4 +585,12 @@ public void next() throws NoSuchElementException, VersionSyntaxException {
assert end >= start;
this.cookie = makeCookie(start, end, token, bits);
}

public String toString() {
StringBuilder b = new StringBuilder(string);
b.insert(getEndIndex(), ">");
b.insert(getStartIndex(), "<");
b.append(' ').append(currentType());
return b.toString();
}
}

0 comments on commit d4ee515

Please sign in to comment.