Home » openjdk-7 » sun » swing » [javadoc | source]
sun.swing
public class: BakedArrayList [javadoc | source]
java.lang.Object
   java.util.AbstractCollection
      java.util.AbstractList
         java.util.ArrayList
            sun.swing.BakedArrayList

All Implemented Interfaces:
    List, java$io$Serializable, RandomAccess, Cloneable, Collection

WARNING: This class is an implementation detail and is only public so that it can be used by two packages. You should NOT consider this public API.

WARNING 2: This is not a general purpose List implementation! It has a specific use and will not work correctly if you use it outside of its use.

A specialized ArrayList that caches its hashCode as well as overriding equals to avoid creating an Iterator. This class is useful in scenarios where the list won't change and you want to avoid the overhead of hashCode iterating through the elements invoking hashCode. This also assumes you'll only ever compare a BakedArrayList to another BakedArrayList.

Fields inherited from java.util.AbstractList:
modCount
Constructor:
 public BakedArrayList(int size) 
 public BakedArrayList(List data) 
Method from sun.swing.BakedArrayList Summary:
cacheHashCode,   equals,   hashCode
Methods from java.util.ArrayList:
add,   add,   addAll,   addAll,   clear,   clone,   contains,   ensureCapacity,   get,   indexOf,   isEmpty,   lastIndexOf,   remove,   remove,   removeRange,   set,   size,   toArray,   toArray,   trimToSize
Methods from java.util.AbstractList:
add,   add,   addAll,   clear,   equals,   get,   hashCode,   indexOf,   iterator,   lastIndexOf,   listIterator,   listIterator,   remove,   removeRange,   set,   subList
Methods from java.util.AbstractCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   remove,   removeAll,   retainAll,   size,   toArray,   toArray,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.swing.BakedArrayList Detail:
 public  void cacheHashCode() 
    Caches the hash code. It is assumed you won't modify the list, or that if you do you'll call cacheHashCode again.
 public boolean equals(Object o) 
 public int hashCode()