[Biojava-l] Navigating a Vector

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Mon Nov 1 19:55:06 EST 2004


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 at bccdc.ca>
Sent by: biojava-l-bounces at portal.open-bio.org
11/02/2004 02:32 AM

 
        To:     <biojava-l at biojava.org>
        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!
-- 
Regards,

Peter Ng
Laboratory Information Management Coordinator
Laboratory Services
BC Centre for Disease Control
655 West 12th Avenue
Vancouver BC  V5Z 4R4
Tel: 604-660-2058 
Fax: 604-660-6073
Web: www.bccdc.org


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





More information about the Biojava-l mailing list