Skip to content
Permalink
Browse files
Merge pull request #6 from tmaret/explicit-position-to-string
Define the positionToString signature explicitly in the API
  • Loading branch information
cschneider committed Jan 3, 2019
2 parents 498af42 + 66e1b18 commit 090771cdeb0cbe8272babfd60407a4a5a6c6ac24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
@@ -25,4 +25,13 @@
*/
public interface Position {
long getOffset();


/**
* Serialise the position into a {@code String} string.
*
* @see {@link Messaging#positionFromString(String)} for the reverse operation.
* @return the position as a string
*/
String positionToString();
}
@@ -32,7 +32,12 @@ public long getOffset() {
}

@Override
public String toString() {
public String positionToString() {
return Long.toString(offset);
}

@Override
public String toString() {
return positionToString();
}
}

0 comments on commit 090771c

Please sign in to comment.