Class DocumentList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Document>
              extended by DocumentList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Document>, java.util.Collection<Document>, java.util.List<Document>, java.util.RandomAccess

public class DocumentList
extends java.util.ArrayList<Document>

DocumentList stores a list of Document objects. Document list must extend ArrayList.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DocumentList()
           
 
Method Summary
 java.lang.String getAbsolutePath(int fileid)
          Return the absolute path of the Document at the position of the list specified by fileid.
 void print()
          Print the entire list of Document objects.
 void printEndsWith(java.lang.String pattern)
          Print all Document objects that have a name ending with the specified pattern.
 void printMatches(java.lang.String pattern)
          Print all Document objects that have a name containing the specified pattern.
 void sortByDate()
          Sort this ArrayList based on the last modified date of the Files contained in each Document object.
 void sortByName()
          Sort this ArrayList based on the name of the Files contained in each Document object.
 
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
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

DocumentList

public DocumentList()
Method Detail

sortByName

public void sortByName()
Sort this ArrayList based on the name of the Files contained in each Document object.


sortByDate

public void sortByDate()
Sort this ArrayList based on the last modified date of the Files contained in each Document object.


printMatches

public void printMatches(java.lang.String pattern)
Print all Document objects that have a name containing the specified pattern.

Parameters:
pattern -

printEndsWith

public void printEndsWith(java.lang.String pattern)
Print all Document objects that have a name ending with the specified pattern.

Parameters:
pattern -

getAbsolutePath

public java.lang.String getAbsolutePath(int fileid)
Return the absolute path of the Document at the position of the list specified by fileid.

Parameters:
fileid -
Returns:
String

print

public void print()
Print the entire list of Document objects.