|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DeviationProvider
This interface specify one method, the computation of a deviation. It works exactly the same as the Comparable interface, for it is generic as well, and provides one method of comparison, computeDeviationTo. Moreover, if one wanted his object to also implement Comparable, he could simply use the computeDeviationTo method and only use the sign of the deviation to get the correct results for the compareTo method. This might be useful for object difficult to compare one to another.
This interface has to be implemented in order for a data type to be used in the comparator tool. In doing so, one has to specify which type of Data the computeDeviationTo concerns.
Comparable| Method Summary | |
|---|---|
double |
computeDeviationTo(boolean type,
DeviationProvider obj,
boolean positive)
Computes the deviation from the current object (this) to the object in parameter. |
| Method Detail |
|---|
double computeDeviationTo(boolean type,
DeviationProvider obj,
boolean positive)
type - absolute or relativeobj - the object to compare the current one to.positive - true if absolute value of deviations, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||