lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Payload API
Date Mon, 19 Nov 2007 19:56:06 GMT
On Nov 19, 2007 2:42 PM, Michael Busch <buschmic@gmail.com> wrote:
> Yonik Seeley wrote:
> >
> > Immutable implies that the user needs to do a new byte[] for every payload, yes?
> > It seems like this would be slower if payloads were common and faster
> > if very rare.
> >
>
> No, Payload has this ctr:
> public Payload(byte[] data, int offset, int length);
>
> So the same byte[] array can currently be used for multiple Payloads.

That's not immutable if I can change the bytes in the byte[] (and it's
legal to do so), since it will result in the value of other payload
objects changing.

-Yonik

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message