public abstract class AbstractAlgorithm<C extends TimeBasedChargeable> extends Object implements BillingModel.Algorithm<C>
| 构造器和说明 |
|---|
AbstractAlgorithm() |
| 限定符和类型 | 方法和说明 |
|---|---|
List<Bill.Detail> |
calc(List<Period> periodList,
C chargeable) |
protected abstract Bill.Detail |
calc(Period period,
long duration,
C chargeable) |
protected TimeUnit |
getTimeUnit() |
protected boolean |
isDiscontinuityAllowed() |
public List<Bill.Detail> calc(List<Period> periodList, C chargeable)
calc 在接口中 BillingModel.Algorithm<C extends TimeBasedChargeable>periodList - 计费的周期protected boolean isDiscontinuityAllowed()
protected TimeUnit getTimeUnit()
protected abstract Bill.Detail calc(Period period, long duration, C chargeable)
period - 时间范围duration - 在此时间范围内的累计时长,时长单位见getTimeUnit()chargeable - 计费对象Copyright © 2020. All rights reserved.