Class FileList

  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<File>
              extended by
All Implemented Interfaces:
Serializable, Cloneable, Iterable<File>, Collection<File>, List<File>, RandomAccess

public class FileList
extends ArrayList<File>

This class extends ArrayList to add a finalize() that calls delete on the files . This helps in getting rid of the finalize() in the classes such as DefaultAbstractBag, and they can be freed up without waiting for finalize to be called. Only if those classes have spilled to disk, there will be a (this) class that needs to be finalized. CAUTION: if you assign a new value for a variable of this type, the files (if any) in the old object it pointed to will be scheduled for deletion. To avoid that call .clear() before assigning a new value.

See Also:
Serialized Form

Field Summary
Fields inherited from class java.util.AbstractList
Constructor Summary
FileList(int i)
FileList(LinkedList<File> ll)
Method Summary
protected  void finalize()
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList

Constructor Detail


public FileList(int i)


public FileList()


public FileList(LinkedList<File> ll)
Method Detail


protected void finalize()
finalize in class Object

Copyright © 2007-2012 The Apache Software Foundation