|
|
Choosing A Webhost: |
Re: Navigating a Vector: msg#00005java.bio.general
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. While order is not guuranteed, you can actually loop over a Vector using a for loop and the Vector elementAt(int index) method. Besides, if you create a [Array|Linked]List from the Vector, you would get the same order. If you want to use an Iterator, Vector implements the iterator() method as well. The only difference between Vector and ArrayList is that Vector is synchronized (threadsafe) and ArrayList is not. http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html Thanks, Rahul _______________________________________________ Biojava-l mailing list - Biojava-l@xxxxxxxxxxx http://biojava.org/mailman/listinfo/biojava-l
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Navigating a Vector, mark . schreiber |
|---|---|
| Next by Date: | Re: Navigating a Vector, Francois Pepin |
| Previous by Thread: | Re: Navigating a Vector, mark . schreiber |
| Next by Thread: | Re: Navigating a Vector, Francois Pepin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |
Home
| advertise | OSDir is
an inevitable website.
|