com.jstatcom.io
Enum DataHandlerTypes
- java.lang.Object
-
- java.lang.Enum<DataHandlerTypes>
-
- com.jstatcom.io.DataHandlerTypes
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<DataHandlerTypes>
public enum DataHandlerTypes extends java.lang.Enum<DataHandlerTypes>
Enumeration of all data handler types.
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description DATDAT files.EXCELXLS files.GAUSS_DATGauss .dat files.GAUSS_FMTGauss .fmt files.MATLABMatlab .m files version 5.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract booleancanWriteFormat()Gets whether it is possible to write files in the represented type.abstract java.lang.StringgetFileExtension()Gets a string with the file extension associated with files that are handled bythis, for example "xls" for Excel files, or "mat" for Matlab files.abstract javax.swing.filechooser.FileFiltergetFileFilter()Gets the file filer associated with this type.abstract DataHandlergetHandler()Gets the import handler of this type.static DataHandlerTypesgetTypeFromFileName(java.lang.String fName)Gets the handler type from the filename.static DataHandlerTypesvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static DataHandlerTypes[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DAT
public static final DataHandlerTypes DAT
DAT files.
-
EXCEL
public static final DataHandlerTypes EXCEL
XLS files.
-
GAUSS_FMT
public static final DataHandlerTypes GAUSS_FMT
Gauss .fmt files.
-
GAUSS_DAT
public static final DataHandlerTypes GAUSS_DAT
Gauss .dat files.
-
MATLAB
public static final DataHandlerTypes MATLAB
Matlab .m files version 5.
-
-
Method Detail
-
values
public static DataHandlerTypes[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataHandlerTypes c : DataHandlerTypes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataHandlerTypes valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getHandler
public abstract DataHandler getHandler()
Gets the import handler of this type.- Returns:
- handler instance
-
getFileFilter
public abstract javax.swing.filechooser.FileFilter getFileFilter()
Gets the file filer associated with this type. Each type should have a unique filter, even if the filename suffixes are the same.- Returns:
- file filter
-
getFileExtension
public abstract java.lang.String getFileExtension()
Gets a string with the file extension associated with files that are handled bythis, for example "xls" for Excel files, or "mat" for Matlab files.- Returns:
- extension string
-
canWriteFormat
public abstract boolean canWriteFormat()
Gets whether it is possible to write files in the represented type.- Returns:
trueif files can be written,falseotherwise
-
getTypeFromFileName
public static DataHandlerTypes getTypeFromFileName(java.lang.String fName)
Gets the handler type from the filename.DATis returned as default.- Parameters:
fName- the filename with a descriptive suffix- Returns:
- handler type
- Throws:
java.lang.IllegalArgumentException-if (fName == null)
-
-
DMelt 3.0 © DataMelt by jWork.ORG