Permalink
Browse files

Make KeyRange.toString() abbreviate for single key and prefix ranges.

  • Loading branch information...
archiecobbs committed Jun 29, 2018
1 parent 02d695e commit e930781baf640a2e4c47adaa59fb73c4753a2fa8
Showing with 4 additions and 0 deletions.
  1. +4 −0 permazen-kv/src/main/java/io/permazen/kv/KeyRange.java
@@ -309,6 +309,10 @@ public int hashCode() {
@Override
public String toString() {
if (this.isSingleKey())
return "[" + ByteUtil.toString(this.min) + "]";
if (this.isPrefixRange())
return "[" + ByteUtil.toString(this.min) + "*]";
return "[" + ByteUtil.toString(this.min) + "," + ByteUtil.toString(this.max) + ")";
}
}

0 comments on commit e930781

Please sign in to comment.