27 lines
725 B
Java
27 lines
725 B
Java
|
|
package com.cbsd.client.pretreatment;
|
||
|
|
|
||
|
|
import com.cbsd.client.pretreatment.CalculateUtils;
|
||
|
|
import com.cbsd.client.pretreatment.IPreTreatmentInterface;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 累加预处理
|
||
|
|
*/
|
||
|
|
public class AccumulatePreTreatment implements IPreTreatmentInterface {
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public String pretreatment(String command, int repeatCount, int hitCount, String latestHitTime, CalculateUtils calculateUtils) {
|
||
|
|
String resultCommand = "";
|
||
|
|
if (hitCount < 10){
|
||
|
|
resultCommand += "0" + hitCount;
|
||
|
|
}else {
|
||
|
|
resultCommand = String.valueOf(hitCount);
|
||
|
|
}
|
||
|
|
return resultCommand;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public String comment() {
|
||
|
|
return "根据命中次数累加拼接";
|
||
|
|
}
|
||
|
|
}
|