sclass Lowest_withRunnerUp extends Lowest {
A runnerUp;
double runnerUpScore;
bool put(A a, double score) {
bool change = false;
synchronized(this) {
if (a != null && isNewBest(score)) {
runnerUp = best;
runnerUpScore = this.score;
best = a;
this.score = score;
set change;
}
}
if (change)
pcallF(onChange);
ret change;
}
synchronized Pair runnerUpPair() { ret runnerUp == null ? null : main.pair(runnerUp, runnerUpScore); }
}