com.mucommander.file.util
Class FileSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by com.mucommander.file.util.FileSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class FileSet
extends java.util.Vector

FileSet is a java.util.Vector of AbstractFile instances, and an optional base folder which is the folder containing the files.

Author:
Maxence Bernard
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FileSet()
          Creates a new empty FileSet.
FileSet(AbstractFile baseFolder)
          Creates a new empty FileSet with the specified base folder.
FileSet(AbstractFile baseFolder, AbstractFile file)
          Creates a new empty FileSet with the specified base folder, and adds the given file.
 
Method Summary
 void addFiles(AbstractFile[] files)
          Adds all the files in the given array to this FileSet.
 AbstractFile fileAt(int i)
          Convenience method that returns the AbstractFile located at the specified position.
 AbstractFile getBaseFolder()
          Returns the base folder associated with this FileSet, null if there isn't any.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

FileSet

public FileSet()
Creates a new empty FileSet.


FileSet

public FileSet(AbstractFile baseFolder)
Creates a new empty FileSet with the specified base folder.

Parameters:
baseFolder - the folder containing the files

FileSet

public FileSet(AbstractFile baseFolder,
               AbstractFile file)
Creates a new empty FileSet with the specified base folder, and adds the given file.

Parameters:
baseFolder - the folder containing the files
file - the file to add
Method Detail

getBaseFolder

public AbstractFile getBaseFolder()
Returns the base folder associated with this FileSet, null if there isn't any.

Returns:
the base folder associated with this FileSet, null if there isn't any.

fileAt

public AbstractFile fileAt(int i)
Convenience method that returns the AbstractFile located at the specified position.

Parameters:
i - index of the file to retrieve
Returns:
the AbstractFile located at the specified position

addFiles

public void addFiles(AbstractFile[] files)
Adds all the files in the given array to this FileSet. Does nothing if the specified array is null
Parameters:
files - the files to add to this FileSet.


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard