Hello,
I have a problem in using the TreeSet in my program, when I try to compile it, I get an error.
Here is my code:
Code:
Public class test implements Comparator
{
/**
*
*/
Public int compares(Object arg0, Object arg1)
{
can c0 = (can) arg0;
can c1 = (can) arg1;
double d = c1.getScoreApresEtapeHarmonisation() - C2.getScoreApresEtapeHarmonisation();
if (d < 0) return +1;
if (d> 0) return -1;
if (== d 0)
{
double[] scr1 = c1.cal();
double[] scr2 = c2.cal();
/ / Comparing scores weighted by dominance.
for ( int i = 1; I < 5; I + + )
{
if (scr1[i] - ScorePondere2[2] < 0) return +1;
if (scr1[i] - ScorePondere2[2] > 0) return -1;
}
}
return 0;
}
}
}
Bookmarks