public abstract class AbstractTimeBasedCalculator<C extends TimeBasedChargeable> extends Object implements Calculator<C>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractTimeBasedCalculator.TimeBasedDetailImpl |
| Constructor and Description |
|---|
AbstractTimeBasedCalculator() |
| Modifier and Type | Method and Description |
|---|---|
protected Bill<C> |
adjustBill(Bill<C> bill,
List<? extends Adjustment<C>> adjustments)
TODO 使用Provider方式聚合
|
Bill<C> |
calc(C chargeable) |
protected abstract C |
copyChargeable(C chargeable,
List<Revision> revisions)
!!! 自行实现,默认实现不靠谱
|
protected abstract TimeUnit |
getTimeUnit() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacceptprotected abstract TimeUnit getTimeUnit()
public Bill<C> calc(C chargeable)
calc in interface Calculator<C extends TimeBasedChargeable>protected abstract C copyChargeable(C chargeable, List<Revision> revisions)
chargeable - chargeablerevisions - revisionsCopyright © 2020. All rights reserved.