Enum Class ItemSimilarityWeights

java.lang.Object
java.lang.Enum<ItemSimilarityWeights>
org.troy.capstone.constants.ItemSimilarityWeights
All Implemented Interfaces:
Serializable, Comparable<ItemSimilarityWeights>, Constable

public enum ItemSimilarityWeights extends Enum<ItemSimilarityWeights>
The ItemSimilarityWeights enum defines the weights used for calculating item similarity based on different attributes. Each constant represents a specific attribute and its associated weight, which indicates the importance of that attribute in the similarity calculation.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The weight for the category attribute when calculating item similarity.
    The weight for the date added attribute when calculating item similarity.
    The weight for the description attribute when calculating item similarity.
    The weight for the name attribute when calculating item similarity.
    The weight for the photo author attribute when calculating item similarity.
    The weight for the price attribute when calculating item similarity.
    The weight for the publisher attribute when calculating item similarity.
    The weight for the review score attribute when calculating item similarity.
    The weight for the tags attribute when calculating item similarity.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The weight associated with the attribute for similarity calculation.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    ItemSimilarityWeights(float weight)
    Constructor for the ItemSimilarityWeights enum.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    Retrieves the weight associated with the attribute for similarity calculation.
    Returns the enum constant of this class with the specified name.
    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

    • NAME

      public static final ItemSimilarityWeights NAME
      The weight for the name attribute when calculating item similarity.
    • PUBLISHER

      public static final ItemSimilarityWeights PUBLISHER
      The weight for the publisher attribute when calculating item similarity.
    • DESCRIPTION

      public static final ItemSimilarityWeights DESCRIPTION
      The weight for the description attribute when calculating item similarity.
    • CATEGORY

      public static final ItemSimilarityWeights CATEGORY
      The weight for the category attribute when calculating item similarity.
    • TAGS

      public static final ItemSimilarityWeights TAGS
      The weight for the tags attribute when calculating item similarity.
    • PHOTO_AUTHOR

      public static final ItemSimilarityWeights PHOTO_AUTHOR
      The weight for the photo author attribute when calculating item similarity.
    • PRICE

      public static final ItemSimilarityWeights PRICE
      The weight for the price attribute when calculating item similarity.
    • REVIEW_SCORE

      public static final ItemSimilarityWeights REVIEW_SCORE
      The weight for the review score attribute when calculating item similarity.
    • DATE_ADDED

      public static final ItemSimilarityWeights DATE_ADDED
      The weight for the date added attribute when calculating item similarity.
  • Field Details

    • weight

      private final float weight
      The weight associated with the attribute for similarity calculation.
  • Constructor Details

    • ItemSimilarityWeights

      private ItemSimilarityWeights(float weight)
      Constructor for the ItemSimilarityWeights enum.
      Parameters:
      weight - The weight to associate with the attribute for similarity calculation.
  • Method Details

    • values

      public static ItemSimilarityWeights[] 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 ItemSimilarityWeights 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
    • getWeight

      public float getWeight()
      Retrieves the weight associated with the attribute for similarity calculation.
      Returns:
      The weight of the attribute for similarity calculation.