public class ExplicitFileList extends FileList
Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
filenames
The list of explicit filenames.
|
Constructor and Description |
---|
ExplicitFileList(java.lang.String[] filenames)
Common constructor which uses a case-insensitive sorting algorithm.
|
ExplicitFileList(java.lang.String[] filenames,
boolean caseSens)
Base constructor to handle all possible cases.
|
Modifier and Type | Method and Description |
---|---|
protected void |
listImpl(java.util.ArrayList results)
Core implementation of the listing algorithm which uses the
File class to create and return the list of files based
on user input specified during construction. |
static void |
main(java.lang.String[] args)
Provides a command line interface for an end user to drive and/or test
the ExplicitFileList class.
|
isCaseSensitive, list, listFilenames, setCaseSensitive, size
public ExplicitFileList(java.lang.String[] filenames, boolean caseSens)
filenames
- The array of absolute or relative file names.caseSens
- Sets the case-sensitivity of the sorting algorithm.public ExplicitFileList(java.lang.String[] filenames)
filenames
- The array of absolute or relative file names.protected void listImpl(java.util.ArrayList results)
File
class to create and return the list of files based
on user input specified during construction. No directories will be
returned in the list and only files that actually exist will be
returned. The resulting list will be sorted lexicographically.public static void main(java.lang.String[] args)
stdout
.
Syntax:
java ExplcitFileList <filename> ...Where:
args
- List of command line arguments.