@Test public void isSatisfied() { assertTrue(rule.isSatisfied(0)); assertFalse(rule.isSatisfied(1)); assertFalse(rule.isSatisfied(2)); assertFalse(rule.isSatisfied(3)); assertTrue(rule.isSatisfied(4)); assertFalse(rule.isSatisfied(5)); assertFalse(rule.isSatisfied(6)); assertFalse(rule.isSatisfied(7)); }
@Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isLessThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; }
UnderIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isLessThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } }
UnderIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isLessThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } UnderIndicatorRule(Indicator<Num> indicator, Number threshold);  UnderIndicatorRule(Indicator<Num> indicator, Num threshold);  UnderIndicatorRule(Indicator<Num> first, Indicator<Num> second); }
UnderIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isLessThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } UnderIndicatorRule(Indicator<Num> indicator, Number threshold);  UnderIndicatorRule(Indicator<Num> indicator, Num threshold);  UnderIndicatorRule(Indicator<Num> first, Indicator<Num> second); @Override boolean isSatisfied(int index, TradingRecord tradingRecord); }
UnderIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isLessThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } UnderIndicatorRule(Indicator<Num> indicator, Number threshold);  UnderIndicatorRule(Indicator<Num> indicator, Num threshold);  UnderIndicatorRule(Indicator<Num> first, Indicator<Num> second); @Override boolean isSatisfied(int index, TradingRecord tradingRecord);  }