Re: java.lang.CharSequence#compare - lexicographical ordering of custom Comparable CharSequence(s)

2019-03-20 Thread Florian Weimer
* Jason Mehrens: > The initial implementation was only optimized to call into > String.compare if the arguments were string [1]. I proposed the > current code a general form to catch java.nio.CharBuffer and any new > JDK implementations of CharSequence + Comparable. > > Naively, I lean towards "-

Re: java.lang.CharSequence#compare - lexicographical ordering of custom Comparable CharSequence(s)

2019-03-11 Thread Jason Mehrens
f of Peter Levart Sent: Monday, March 11, 2019 4:04 AM To: core-libs-dev Subject: java.lang.CharSequence#compare - lexicographical ordering of custom Comparable CharSequence(s) Hello, I stumbled on the specification of a static utility method CharSequence#compare introduced in Java 11

java.lang.CharSequence#compare - lexicographical ordering of custom Comparable CharSequence(s)

2019-03-11 Thread Peter Levart
Hello, I stumbled on the specification of a static utility method CharSequence#compare introduced in Java 11 which says: * Compares two {@code CharSequence} instances lexicographically. Returns a * negative value, zero, or a positive value if the first sequence is lexicographically