2021-10-28 23:48:25 +02:00
|
|
|
package it.cavallium.dbengine.client;
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
2023-02-09 23:34:25 +01:00
|
|
|
import org.jetbrains.annotations.Nullable;
|
2021-10-28 23:48:25 +02:00
|
|
|
|
2023-02-09 23:34:25 +01:00
|
|
|
public record HitEntry<T, U>(T key, @Nullable U value, float score)
|
2021-10-28 23:48:25 +02:00
|
|
|
implements Comparable<HitEntry<T, U>> {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int compareTo(@NotNull HitEntry<T, U> o) {
|
|
|
|
return Float.compare(o.score, this.score);
|
|
|
|
}
|
|
|
|
}
|