SegmentInfos extends Vector

2010-02-28 Thread Shai Erera
Hi What's the reason SegmentInfos extends Vector rather than say ArrayList? Do we need the synchronization around it which Vector provides? Shai

RE: SegmentInfos extends Vector

2010-02-28 Thread Uwe Schindler
Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de http://www.thetaphi.de/ eMail: u...@thetaphi.de From: Shai Erera [mailto:ser...@gmail.com] Sent: Sunday, February 28, 2010 12:33 PM To: java-dev@lucene.apache.org Subject: SegmentInfos extends Vector Hi What's the reason

Re: SegmentInfos extends Vector

2010-02-28 Thread Shai Erera
*From:* Shai Erera [mailto:ser...@gmail.com] *Sent:* Sunday, February 28, 2010 12:33 PM *To:* java-dev@lucene.apache.org *Subject:* SegmentInfos extends Vector Hi What's the reason SegmentInfos extends Vector rather than say ArrayList? Do we need the synchronization around it which Vector

RE: SegmentInfos extends Vector

2010-02-28 Thread Uwe Schindler
://www.thetaphi.de eMail: u...@thetaphi.de From: Shai Erera [mailto:ser...@gmail.com] Sent: Sunday, February 28, 2010 1:20 PM To: java-dev@lucene.apache.org Subject: Re: SegmentInfos extends Vector Yes that's what I've been thinking as well - SegmentInfos should have a segments-related API

RE: SegmentInfos extends Vector

2010-02-28 Thread Uwe Schindler
: SegmentInfos extends Vector I would rather avoid implementing List .. we should implement Iterable for sure, but I'd like to keep the API open either iterating in-order or getting a particular SegmentInfo. Another thing, I haven't seen anywhere that remove is called. In general I don't like to impl

RE: SegmentInfos extends Vector

2010-02-28 Thread Uwe Schindler
http://www.thetaphi.de http://www.thetaphi.de/ eMail: u...@thetaphi.de From: Shai Erera [mailto:ser...@gmail.com] Sent: Sunday, February 28, 2010 1:20 PM To: java-dev@lucene.apache.org Subject: Re: SegmentInfos extends Vector Yes that's what I've been thinking as well - SegmentInfos

Re: SegmentInfos extends Vector

2010-02-28 Thread Shai Erera
...@thetaphi.de *From:* Shai Erera [mailto:ser...@gmail.com] *Sent:* Sunday, February 28, 2010 1:38 PM *To:* java-dev@lucene.apache.org *Subject:* Re: SegmentInfos extends Vector I would rather avoid implementing List .. we should implement Iterable for sure, but I'd like to keep the API

RE: SegmentInfos extends Vector

2010-02-28 Thread Uwe Schindler
: SegmentInfos extends Vector Why do you say remove was unsupported before? I don't see it in the class's impl. It just inherits from Vector and so remove is supported by inheritance. Since the class is public, someone may have called it. Even if we change the class to impl List, period, we'll break

Re: SegmentInfos extends Vector

2010-02-28 Thread DM Smith
:38 PM To: java-dev@lucene.apache.org Subject: Re: SegmentInfos extends Vector I would rather avoid implementing List .. we should implement Iterable for sure, but I'd like to keep the API open either iterating in-order or getting a particular SegmentInfo. Another thing, I haven't

Re: SegmentInfos extends Vector

2010-02-28 Thread Shai Erera
*To:* java-dev@lucene.apache.org *Subject:* Re: SegmentInfos extends Vector Why do you say remove was unsupported before? I don't see it in the class's impl. It just inherits from Vector and so remove is supported by inheritance. Since the class is public, someone may have called it. Even

Re: SegmentInfos extends Vector

2010-02-28 Thread Shai Erera
Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de *From:* Shai Erera [mailto:ser...@gmail.com] *Sent:* Sunday, February 28, 2010 2:22 PM *To:* java-dev@lucene.apache.org *Subject:* Re: SegmentInfos extends Vector Ok so just that I'm

Re: SegmentInfos extends Vector

2010-02-28 Thread Michael McCandless
] Sent: Sunday, February 28, 2010 2:22 PM To: java-dev@lucene.apache.org Subject: Re: SegmentInfos extends Vector Ok so just that I'm cleared - unmodifiable you mean for iteration only right? And .. do you agree then to refactor the class, or prefer to keep it like that? If you agree

Re: SegmentInfos extends Vector

2010-02-28 Thread Shai Erera
://www.thetaphi.de eMail: u...@thetaphi.de From: Shai Erera [mailto:ser...@gmail.com] Sent: Sunday, February 28, 2010 2:22 PM To: java-dev@lucene.apache.org Subject: Re: SegmentInfos extends Vector Ok so just that I'm cleared - unmodifiable you mean for iteration only