RandomAccess


RandomAccess java.util

Java 1.4

This marker interface is implemented by List implementations to advertise that they provide efficient (usually constant time) random access to all list elements. ArrayList and Vector implement this interface, but LinkedList does not. Classes that manipulate generic List objects may want to test for this interface with instanceof and use different algorithms for lists that provide efficient random access than they use for lists that are most efficiently accessed sequentially.

 public interface  RandomAccess  { } 

Implementations

ArrayList , Vector , java.util.concurrent.CopyOnWriteArrayList



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net