Package sc2002.FCS1.grp2
Enum Class CSVFileTypes
- All Implemented Interfaces:
Serializable,Comparable<CSVFileTypes>,Constable
Represents a CSV File Type that can be encodable.
- Author:
- Vincent Neo
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a CSV file that contains a list ofApplicantobjects, when decoded.Represents a CSV file that contains a list ofApplicationobjects, when decoded.Represents a CSV file that contains a list ofEnquiryobjects, when decoded.Represents a CSV file that contains a list ofHDBManagerobjects, when decoded.Represents a CSV file that contains a list ofHDBOfficerobjects, when decoded.Represents a CSV file that contains a list ofBTOProjectobjects, when decoded. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet file name of this CSV file.Provides the header of a CSV file This ensures that the generated or updated CSV file retains its header, such that it is still readable in a spreadsheets application.static CSVFileTypesReturns the enum constant of this class with the specified name.static CSVFileTypes[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
APPLICANT_LIST
Represents a CSV file that contains a list ofApplicantobjects, when decoded. -
MANAGER_LIST
Represents a CSV file that contains a list ofHDBManagerobjects, when decoded. -
OFFICER_LIST
Represents a CSV file that contains a list ofHDBOfficerobjects, when decoded. -
PROJECT_LIST
Represents a CSV file that contains a list ofBTOProjectobjects, when decoded. -
ENQUIRIES_LIST
Represents a CSV file that contains a list ofEnquiryobjects, when decoded. -
APPLICATIONS_LIST
Represents a CSV file that contains a list ofApplicationobjects, when decoded.
-
-
Field Details
-
fileName
CSV filename of that this enum value represents.
-
-
Constructor Details
-
CSVFileTypes
Enum constructor- Parameters:
fileName- File name used for constructing this value
-
-
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
-
getFileName
Get file name of this CSV file. (inclusive of file extension .csv)- Returns:
- File name of respective CSV file.
-
getHeader
Provides the header of a CSV file This ensures that the generated or updated CSV file retains its header, such that it is still readable in a spreadsheets application.- Returns:
- A string that represents the first row (i.e. header) of the respective CSV file type.
-