import mecsyco.core.operation.time.TimeOperation; import mecsyco.core.type.SimulData; import mecsyco.core.type.SimulEvent; public class TimeOperationTemplate extends TimeOperation{ /* * Constructor * You can have empty, depend on if you want a flexible operation or a fixed one * (fixed because in any case, the operation will be exactly the same) * here, we use a constructor for flexible operation */ public TimeOperationTemplate (Type1 aVars1, Type2 aVars2) { Vars1=aVars1; Vars2=aVars2; } /* *Implementation *In the case of flexible, create variable for the operation */ private Type1 Var1; private Type2 var2; @Override public double apply(double arg0) { //the result, can be any SimulData type you want Double result; /* * Operation you want to do * For making it flexible, use variable you created (Vars1 and Vars 2 here) * Math operation can be found in java class Math (Math.***) * Don't forgot to assign the result of the operation in the variable "result" */ return result; } }