Why does CharSequence not have String getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
Martin Buchholz
martinrb at google.com
Fri Oct 17 20:08:11 UTC 2008
Paulo,
I think you're right, that bulk char reading operations should have
been part of this interface. But it's too late now; interfaces
can never be changed. Hotspot does not do such a bad job
optimizing calls through interfaces. Do we know what the
penalty is? (usual micro-benchmark warnings apply)
Martin
On Fri, Oct 17, 2008 at 12:58, Paulo Levi <i30817 at gmail.com> wrote:
> Why does CharSequence not have String getChars(int srcBegin, int
> srcEnd, char[] dst, int dstBegin)
> should be
> Why does CharSequence not have CharSequence getChars(int srcBegin, int
> srcEnd, char[] dst, int dstBegin)
>
> With appropriate covariant returns down the inheritance tree.
>
More information about the core-libs-dev
mailing list