public final class InvoiceCalculator extends Object
Completes the Invoice and calculates with specified Corrections 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
Corrections on the Invoice |
void |
reset()
Resets calculator and removes all applied
Corrections. |
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 Corrections on the Invoice
public void reset()
Resets calculator and removes all applied Corrections.
Copyright © 2014-2016 Konik.io. All Rights Reserved.