RFR (JDK11) 8137326: Methods for comparing CharSequence, StringBuilder, and StringBuffer
xueming.shen at oracle.com
Fri Jan 26 22:12:57 UTC 2018
On 1/26/18, 1:48 PM, huizhe wang wrote:
> Thanks Stephen for the note.
> I downloaded the api , but don't seem to see a class
> "DateTimeParseContext". Do you have a pointer to the current webrev?
> What does it do, and what would be the implication with regards to the
> CharSequence compare method?
>  https://jcp.org/en/jsr/detail?id=310
> On 1/26/2018 7:01 AM, Stephen Colebourne wrote:
>> Just to note that JSR-310 had to add a CharSequence comparison method.
>> Not the same as this one, but a data point, and perhaps a target to
>> become public in a future webrev. See
>> On 26 January 2018 at 03:00, Joe Wang <huizhe.wang at oracle.com> wrote:
>>> Adding methods for comparing CharSequence, StringBuilder, and
>>> The Comparable implementations for StringBuilder/Buffer are similar
>>> to that
>>> of String, allowing comparison operations between two
>>> StringBuilders/Buffers, e.g.
>>> For CharSequence however, refer to the comments in JIRA, a static
>>> 'compare' is added instead of implementing the Comparable interface.
>>> 'compare' method may take CharSequence implementations such as String,
>>> StringBuilder and StringBuffer, making it possible to perform
>>> among them. The previous example for example is equivalent to
>>> CharSequence.compare(aStringBuilder, anotherStringBuilder).
>>> Tests for java.base have been independent from each other. The new
>>> tests are
>>> therefore created to have no dependency on each other or sharing any
>>> JBS: https://bugs.openjdk.java.net/browse/JDK-8137326
>>> webrev: http://cr.openjdk.java.net/~joehw/jdk11/8137326/webrev/
More information about the core-libs-dev