@Test public void isSatisfied() { assertTrue(rule.isSatisfied(10)); assertFalse(rule.isSatisfied(11)); assertFalse(rule.isSatisfied(12)); assertFalse(rule.isSatisfied(13)); assertFalse(rule.isSatisfied(14)); }
@Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { if (!satisfied) { satisfied = true; traceIsSatisfied(index, true); return true; } traceIsSatisfied(index, false); return false; }
JustOnceRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { if (!satisfied) { satisfied = true; traceIsSatisfied(index, true); return true; } traceIsSatisfied(index, false); return false; } }
JustOnceRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { if (!satisfied) { satisfied = true; traceIsSatisfied(index, true); return true; } traceIsSatisfied(index, false); return false; }  }
JustOnceRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { if (!satisfied) { satisfied = true; traceIsSatisfied(index, true); return true; } traceIsSatisfied(index, false); return false; }  @Override boolean isSatisfied(int index, TradingRecord tradingRecord); }
JustOnceRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { if (!satisfied) { satisfied = true; traceIsSatisfied(index, true); return true; } traceIsSatisfied(index, false); return false; }  @Override boolean isSatisfied(int index, TradingRecord tradingRecord);  }