Comparator for instances of
StreamLocationProvider
, which uses
StreamLocationProvider.getCharacterOffset()
as the only comparison criterion.
Note that the line and column number properties are not taken into account. As a consequence
this comparator is not necessarily consistent with the equals(Object)
methods of the implementations of
StreamLocationProvider
. (If this comparator returns 0 for two objects, these objects are not
necessarily equal, they only have the same character offset.) Therefore this comparator should
not be used together with sorted sets or sorted maps, as described in the documentation of Comparator
.