|
From: Thies <tg...@us...> - 2007-10-22 19:41:37
|
Update of /cvsroot/tail/Tail/src/java/net/sf/tail/strategy In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6545/src/java/net/sf/tail/strategy Modified Files: MinValueStopperStrategy.java Log Message: Novos testes e refatoração do MinValueStopper Index: MinValueStopperStrategy.java =================================================================== RCS file: /cvsroot/tail/Tail/src/java/net/sf/tail/strategy/MinValueStopperStrategy.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MinValueStopperStrategy.java 3 Oct 2007 17:46:59 -0000 1.8 --- MinValueStopperStrategy.java 22 Oct 2007 19:41:39 -0000 1.9 *************** *** 29,34 **** public boolean shouldEnter(int index) { ! value = indicator.getValue(index).doubleValue(); ! return strategy.shouldEnter(index); } --- 29,37 ---- public boolean shouldEnter(int index) { ! if(strategy.shouldEnter(index)) { ! value = indicator.getValue(index).doubleValue(); ! return true; ! } ! return false; } *************** *** 41,45 **** public String getName() { ! return String.format("%s stoper: %s", this.getClass().getSimpleName(), ""+ loss); } } --- 44,48 ---- public String getName() { ! return String.format("%s stoper: %s over %s", this.getClass().getSimpleName(), ""+ loss, strategy.getName()); } } |