Enum Class Extension
- All Implemented Interfaces:
Serializable
,Comparable<Extension>
,java.lang.constant.Constable
This Enum defines the file extensions supported by the library.
- Since:
- 0.1.0
- Author:
- Mirko Benincasa
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Extension
getExcelExtension
(String ext) This method retrieves the Enum value based on the extension name provided as inputstatic Extension
Returns the enum constant of this class with the specified name.static Extension[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
XLS
This extension is used for a Microsoft Office spreadsheet up to version 2003 -
XLSX
This extension is used for a Microsoft Office spreadsheet from version 2007 onwards -
CSV
This extension is used for CSV (Comma-separated values) files -
JSON
- Since:
- 0.4.0 This extension is used for JSON (JavaScript Object Notation) files
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getExcelExtension
This method retrieves the Enum value based on the extension name provided as input- Parameters:
ext
- the name of an Excel file extension to search for- Returns:
- The Enum value that matches the name provided as input and is of type Excel
- Throws:
ExtensionNotValidException
- if no Enum value is found
-
isExcelExtension
- Returns:
true
if it has type EXCEL- Since:
- 0.1.1
-