Enum Class PriceModificationType
java.lang.Object
java.lang.Enum<PriceModificationType>
com.broadleafcommerce.pricing.domain.type.PriceModificationType
- All Implemented Interfaces:
Serializable,Comparable<PriceModificationType>,Constable
Operations that
PriceModifiers can perform on
prices.- Author:
- Nathan Moore (nathanmoore).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionModifies the price by adding the amount to itModifies the price by multiplying it by the amountModifies the price by multiplying it by 1 + (amount / 100)Modifies the price by multiplying it by (amount / 100)Modifies the price by subtracting the amount from itModifies the price by dividing it by (1 - (amount / 100)_ -
Method Summary
Modifier and TypeMethodDescriptionstatic PriceModificationTypeReturns the enum constant of this class with the specified name.static PriceModificationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PERCENT_MARKUP
Modifies the price by multiplying it by 1 + (amount / 100) -
TARGET_MARGIN
Modifies the price by dividing it by (1 - (amount / 100)_ -
ADDITION
Modifies the price by adding the amount to it -
PERCENTAGE
Modifies the price by multiplying it by (amount / 100) -
MULTIPLICATION
Modifies the price by multiplying it by the amount -
SUBTRACTION
Modifies the price by subtracting the amount from it
-
-
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
-