@Test public void betterThan() { AnalysisCriterion criterion = new BuyAndHoldCriterion(); assertTrue(criterion.betterThan(1.3, 1.1)); assertFalse(criterion.betterThan(0.6, 0.9)); }
@Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 > criterionValue2; }
BuyAndHoldCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 > criterionValue2; } }
BuyAndHoldCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 > criterionValue2; }  }
BuyAndHoldCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 > criterionValue2; }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override double calculate(TimeSeries series, Trade trade); @Override boolean betterThan(double criterionValue1, double criterionValue2); }
BuyAndHoldCriterion extends AbstractAnalysisCriterion { @Override public boolean betterThan(double criterionValue1, double criterionValue2) { return criterionValue1 > criterionValue2; }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override double calculate(TimeSeries series, Trade trade); @Override boolean betterThan(double criterionValue1, double criterionValue2);  }