public class TableOfContents
extends java.lang.Object
Constructor and Description |
---|
TableOfContents(java.lang.String name)
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DirectoryContents dir)
Adds the given directory contents holder to the table of contents
|
DirectoryContents |
dirContentAt(int index)
Returns the DirectoryContents entry at the specified index.
|
java.lang.String |
dirNameAt(int index)
Returns the name of the directory entry at the specified index.
|
FileInfo[] |
filesAt(int index)
Returns the file info objects of the directory entry at the specified index.
|
java.util.List<DirectoryContents> |
findSubDirsOf(java.lang.String baseDir)
Returns all sub-directories under the given base directory.
|
protected java.lang.String |
getContainerName() |
DirectoryContents[] |
getDirectories()
Returns all contained directories
|
protected java.util.List<DirectoryContents> |
getDirInfos() |
java.lang.String |
getName()
Returns the name of the container this table of contents belongs to
|
protected java.lang.String |
inspectString()
Returns a display string for an inspector.
|
protected void |
setContainerName(java.lang.String newValue) |
protected void |
setDirInfos(java.util.List<DirectoryContents> newValue) |
int |
size()
Returns the number of directory entries in this table of contents
|
public TableOfContents(java.lang.String name)
public java.lang.String getName()
public void add(DirectoryContents dir)
public DirectoryContents[] getDirectories()
public int size()
public DirectoryContents dirContentAt(int index)
java.lang.ArrayIndexOutOfBoundsException
- if the index is not validpublic java.lang.String dirNameAt(int index)
java.lang.ArrayIndexOutOfBoundsException
- if the index is not validpublic FileInfo[] filesAt(int index)
java.lang.ArrayIndexOutOfBoundsException
- if the index is not validpublic java.util.List<DirectoryContents> findSubDirsOf(java.lang.String baseDir)
baseDir
- The directory under which to look for the sub directories.protected java.lang.String inspectString()
protected java.lang.String getContainerName()
protected void setContainerName(java.lang.String newValue)
protected java.util.List<DirectoryContents> getDirInfos()
protected void setDirInfos(java.util.List<DirectoryContents> newValue)