Enum Class TableColumnName
- All Implemented Interfaces:
Serializable, Comparable<TableColumnName>, Constable
Enum for column names in the dataset, to avoid hardcoding strings throughout the codebase and reduce risk of typos.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionColumn name for the category of the item.Column name for the date the item was added.Column name for the description of the item.Column name for the ID of the item.Column name for the URL of the item's image.Column name for the index of the item.Column name for the name of the item.Column name for the author of the item's photo.Column name for the URL of the page for the author of the item's photo.Column name for the price of the item.Column name for the publisher of the item.Column name for the relevance score of the item.Column name for the review count of the item.Column name for the review score of the item.Column name for the stock quantity of the item.Column name for the tags associated with the item. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Set<TableColumnName> Set of column names that are considered categorical variables.private final StringThe column name represented by this enum constant. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTableColumnName(String columnName) Constructor for the enum constants. -
Method Summary
Modifier and TypeMethodDescriptionstatic Set<TableColumnName> Getter for the set of categorical column names.Getter for the column name associated with this enum constant.static TableColumnNameReturns the enum constant of this class with the specified name.static TableColumnName[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INDEX
Column name for the index of the item. -
ID
Column name for the ID of the item. -
IMAGE_URL
Column name for the URL of the item's image. -
NAME
Column name for the name of the item. -
PUBLISHER
Column name for the publisher of the item. -
DESCRIPTION
Column name for the description of the item. -
CATEGORY
Column name for the category of the item. -
TAGS
Column name for the tags associated with the item. -
PRICE
Column name for the price of the item. -
REVIEW_SCORE
Column name for the review score of the item. -
REVIEW_COUNT
Column name for the review count of the item. -
STOCK_QUANTITY
Column name for the stock quantity of the item. -
DATE_ADDED
Column name for the date the item was added. -
PHOTO_AUTHOR
Column name for the author of the item's photo. -
PHOTO_AUTHOR_URL
Column name for the URL of the page for the author of the item's photo. -
RELEVANCE
Column name for the relevance score of the item.
-
-
Field Details
-
columnName
The column name represented by this enum constant. -
categoricalColumns
Set of column names that are considered categorical variables.
-
-
Constructor Details
-
TableColumnName
Constructor for the enum constants.- Parameters:
columnName- The string representation of the column name associated with this enum constant.
-
-
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
-
getCategoricalColumns
Getter for the set of categorical column names.- Returns:
- A set of TableColumnName enums that are considered categorical variables.
-
getColumnName
Getter for the column name associated with this enum constant.- Returns:
- The column name as a string.
-