Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Navigating a Vector: msg#00006

java.bio.general

Subject: Re: Navigating a Vector

Vector implements List and List guarantees that the iterator goes
through the right order. And getting a ListIterator lets you go back and
forth.

And indexOf(Object element) would give you the (first) index of where a
given element is found.

Is there something I'm missing here?

Francois

On Mon, 2004-11-01 at 19:55, mark.schreiber@xxxxxxxxxxxxxxxxxx wrote:
> I'm not sure you can, especially because iterators on Vectors are not
> gaurenteed to operate in any special order. If possible you should use an
> ArrayList or LinkedList. In this case you will be able to find the index
> or even ask for items by their index.
>
> You can make a List or LinkedList out of a Vector as it is a Collection.
>
> - Mark
>
>
>
>
>
> "Ng, Peter" <Peter.Ng@xxxxxxxx>
> Sent by: biojava-l-bounces@xxxxxxxxxxxxxxxxxxx
> 11/02/2004 02:32 AM
>
>
> To: <biojava-l@xxxxxxxxxxx>
> cc: (bcc: Mark Schreiber/GP/Novartis)
> Subject: [Biojava-l] Navigating a Vector
>
>
> I'm trying to iterate through a database using a Vector and
> previous/next JButtons. How do I find the Vector index of the current
> record so I can navigate forward and back in the Vector? Thanks in
> advance!

_______________________________________________
Biojava-l mailing list - Biojava-l@xxxxxxxxxxx
http://biojava.org/mailman/listinfo/biojava-l



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo