Enum Class CSVFileTypes

Object
Enum<CSVFileTypes>
CSVFileTypes
All Implemented Interfaces:
Serializable, Comparable<CSVFileTypes>, Constable

public enum CSVFileTypes extends Enum<CSVFileTypes>
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 Constants
    Enum Constant
    Description
    Represents a CSV file that contains a list of Applicant objects, when decoded.
    Represents a CSV file that contains a list of Application objects, when decoded.
    Represents a CSV file that contains a list of Enquiry objects, when decoded.
    Represents a CSV file that contains a list of HDBManager objects, when decoded.
    Represents a CSV file that contains a list of HDBOfficer objects, when decoded.
    Represents a CSV file that contains a list of BTOProject objects, when decoded.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    CSV filename of that this enum value represents.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    CSVFileTypes(String fileName)
    Enum constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    Get 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.
    Returns the enum constant of this class with the specified name.
    static CSVFileTypes[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • APPLICANT_LIST

      public static final CSVFileTypes APPLICANT_LIST
      Represents a CSV file that contains a list of Applicant objects, when decoded.
    • MANAGER_LIST

      public static final CSVFileTypes MANAGER_LIST
      Represents a CSV file that contains a list of HDBManager objects, when decoded.
    • OFFICER_LIST

      public static final CSVFileTypes OFFICER_LIST
      Represents a CSV file that contains a list of HDBOfficer objects, when decoded.
    • PROJECT_LIST

      public static final CSVFileTypes PROJECT_LIST
      Represents a CSV file that contains a list of BTOProject objects, when decoded.
    • ENQUIRIES_LIST

      public static final CSVFileTypes ENQUIRIES_LIST
      Represents a CSV file that contains a list of Enquiry objects, when decoded.
    • APPLICATIONS_LIST

      public static final CSVFileTypes APPLICATIONS_LIST
      Represents a CSV file that contains a list of Application objects, when decoded.
  • Field Details

    • fileName

      private String fileName
      CSV filename of that this enum value represents.
  • Constructor Details

    • CSVFileTypes

      private CSVFileTypes(String fileName)
      Enum constructor
      Parameters:
      fileName - File name used for constructing this value
  • Method Details

    • values

      public static CSVFileTypes[] 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

      public static CSVFileTypes valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getFileName

      public String getFileName()
      Get file name of this CSV file. (inclusive of file extension .csv)
      Returns:
      File name of respective CSV file.
    • getHeader

      public String 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.