|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- public interface Best<T extends net.sf.tostring0.Identifiable>
This interface defines the methods available on an object which keeps track
of the "best" of an (unrelated) group of Identifiable
objects. The
objects may or may not be part of some Collection.
By best, we actually mean the largest value (as a double).
Method Summary | |
---|---|
T |
getObject()
|
ProcessBest<T> |
getProcessor()
|
void |
reset()
Reset this Best object as if it had been newly constructed. |
boolean |
update(java.util.Collection<T> candidates)
This method updates this Best object for each of the candidates in the given collection. |
boolean |
update(T candidate,
boolean override)
Method to conditionally update the best value. |
Methods inherited from interface com.rubecula.darwin.foundation.Valuable |
---|
getValue |
Methods inherited from interface net.sf.tostring0.Identifiable |
---|
getIdentifier |
Method Detail |
---|
T getObject()
ProcessBest<T> getProcessor()
void reset()
Best
object as if it had been newly constructed.
boolean update(java.util.Collection<T> candidates) throws ValueException
candidates
-
ValueException
boolean update(T candidate, boolean override) throws ValueException
candidate
- the T which is the new proposal for best object. Note that a
new candidate may or may not have a different value from
previous objects. That's to say if two candidates are the
same, they will have the same value, but not vice versa.override
- this is only referenced if this Best
object has a
non-zero value for convergence. If the override is true, then
an equivalent object will always trigger the processor and
return true, regardless of whether convergence has been
achieved.
ValueException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |