?? compositebestforcustomerpricingstrategy.java
字號:
/**
* @name CompositeBestForCustomerPricingStrategy.java
* @author Administrator/pan
* @version 1.1
* @date 2009/2/16
*/
package com.digitstore.process.server.sale;
import sun.text.CompactShortArray.Iterator;
import com.digitstore.process.sale.Sale;
public class CompositeBestForCustomerPricingStrategy extends
CompositePricingStrategy {
@Override
public double getTotal(Sale sale) {
double lowestTotal = 0;
for(java.util.Iterator<ISalePricingStrategy> i = pricingStrategies.iterator(); i.hasNext();){
ISalePricingStrategy strategy =
(ISalePricingStrategy)i.next();
double total = strategy.getTotal(sale);
if(total <= lowestTotal){
lowestTotal = total;
}
}
return lowestTotal;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -