us.zuercher.gpx2map.util
Class FileFormatDescriptor

java.lang.Object
  extended by us.zuercher.gpx2map.util.FileFormatDescriptor
Direct Known Subclasses:
ImageFormatDescriptor

public class FileFormatDescriptor
extends Object

FileFormatDescriptor generically describes a file format. File formats have a name and a list of common file name extensions.

Author:
Stephan Zuercher

Field Summary
private  List<String> formatExtensions
          A List of common extensions for files of this format.
private  String formatName
          The file format's name.
 
Constructor Summary
FileFormatDescriptor(String formatName, String... fileExtensions)
          Constructs a new FileFormatDescriptor with the given name and file extension.
 
Method Summary
 List<String> getFileExtensions()
          Returns the common filename extensions for this format.
 String getFormatName()
          Returns the file format's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formatName

private final String formatName
The file format's name.


formatExtensions

private final List<String> formatExtensions
A List of common extensions for files of this format.

Constructor Detail

FileFormatDescriptor

public FileFormatDescriptor(String formatName,
                            String... fileExtensions)
Constructs a new FileFormatDescriptor with the given name and file extension.

Parameters:
formatName - the name of the format
fileExtensions - the format's file extensions (e.g., ".gif")
Method Detail

getFormatName

public String getFormatName()
Returns the file format's name.

Returns:
the file format's name.

getFileExtensions

public List<String> getFileExtensions()
Returns the common filename extensions for this format.

Returns:
the common filename extensions for this format.