Enum Class PriceModificationType

java.lang.Object
java.lang.Enum<PriceModificationType>
com.broadleafcommerce.pricing.domain.type.PriceModificationType
All Implemented Interfaces:
Serializable, Comparable<PriceModificationType>, Constable

public enum PriceModificationType extends Enum<PriceModificationType>
Operations that PriceModifiers can perform on prices.
Author:
Nathan Moore (nathanmoore).
  • Enum Constant Details

    • PERCENT_MARKUP

      public static final PriceModificationType PERCENT_MARKUP
      Modifies the price by multiplying it by 1 + (amount / 100)
    • TARGET_MARGIN

      public static final PriceModificationType TARGET_MARGIN
      Modifies the price by dividing it by (1 - (amount / 100)_
    • ADDITION

      public static final PriceModificationType ADDITION
      Modifies the price by adding the amount to it
    • PERCENTAGE

      public static final PriceModificationType PERCENTAGE
      Modifies the price by multiplying it by (amount / 100)
    • MULTIPLICATION

      public static final PriceModificationType MULTIPLICATION
      Modifies the price by multiplying it by the amount
    • SUBTRACTION

      public static final PriceModificationType SUBTRACTION
      Modifies the price by subtracting the amount from it
  • Method Details

    • values

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