Class Tax
- java.lang.Object
-
- de.hybris.order.calculation.domain.Tax
-
public class Tax extends java.lang.ObjectRepresents the tax, which applies generally to line items or additional charges.
-
-
Constructor Summary
Constructors Constructor Description Tax(AbstractAmount amount)Creates a new tax with a given amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTarget(Taxable target)Adds a new target to this tax.voidaddTargets(Taxable... targets)Adds multiple targets to this tax.voidaddTargets(java.util.List<? extends Taxable> targets)Adds multiple targets to this tax.voidclearTargets()AbstractAmountgetAmount()Returns the amount of this tax.java.util.Collection<Taxable>getTargets()Returns all targets of this tax.voidremoveTarget(Taxable target)Removes a single target from this tax.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Tax
public Tax(AbstractAmount amount)
Creates a new tax with a given amount.
-
-
Method Detail
-
getAmount
public AbstractAmount getAmount()
Returns the amount of this tax. May be eitherPercentageorMoneyin some rare occasions.
-
addTarget
public void addTarget(Taxable target)
Adds a new target to this tax.
-
addTargets
public void addTargets(java.util.List<? extends Taxable> targets)
Adds multiple targets to this tax.
-
addTargets
public void addTargets(Taxable... targets)
Adds multiple targets to this tax.
-
getTargets
public java.util.Collection<Taxable> getTargets()
Returns all targets of this tax.
-
removeTarget
public void removeTarget(Taxable target)
Removes a single target from this tax.
-
clearTargets
public void clearTargets()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-