public final class InvoiceCalculator extends java.lang.Object
Completes the Invoice
and calculates with specified Correction
s or additions.
Constructor and Description |
---|
InvoiceCalculator(Invoice invoice)
Instantiates a new invoice calculator.
|
Modifier and Type | Method and Description |
---|---|
void |
applyCorrection(Correction<Invoice> correction)
Registers
Correction to apply on the Invoice . |
Invoice |
complete()
Runs all registered
Correction s on the Invoice |
void |
reset()
Resets calculator and removes all applied
Correction s. |
public InvoiceCalculator(@NotNull Invoice invoice)
Instantiates a new invoice calculator.
invoice
- the invoicepublic void applyCorrection(Correction<Invoice> correction)
Registers Correction
to apply on the Invoice
.
correction
- the correctionpublic Invoice complete()
Runs all registered Correction
s on the Invoice
public void reset()
Resets calculator and removes all applied Correction
s.
Copyright © 2014-2018 Konik.io. All Rights Reserved.