@Test public void betterThan() { AnalysisCriterion criterion = new LinearTransactionCostCriterion(1000, 0.5); assertTrue(criterion.betterThan(3.1, 4.2)); assertFalse(criterion.betterThan(2.1, 1.9)); }
@Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 < criterionValue2; }
LinearTransactionCostCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 < criterionValue2; } }
LinearTransactionCostCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 < criterionValue2; } LinearTransactionCostCriterion(double initialAmount, double a);  LinearTransactionCostCriterion(double initialAmount, double a, double b); }
LinearTransactionCostCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 < criterionValue2; } LinearTransactionCostCriterion(double initialAmount, double a);  LinearTransactionCostCriterion(double initialAmount, double a, double b); @Override double calculate(TimeSeries series, Trade trade); @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override boolean betterThan(double criterionValue1, double criterionValue2); }
LinearTransactionCostCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 < criterionValue2; } LinearTransactionCostCriterion(double initialAmount, double a);  LinearTransactionCostCriterion(double initialAmount, double a, double b); @Override double calculate(TimeSeries series, Trade trade); @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override boolean betterThan(double criterionValue1, double criterionValue2);  }