2020-12-07 22:15:18 +01:00
|
|
|
package it.cavallium.dbengine.database;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Objects;
|
|
|
|
|
2021-04-03 19:09:06 +02:00
|
|
|
@SuppressWarnings("unused")
|
2020-12-07 22:15:18 +01:00
|
|
|
public class LLTopKeys {
|
|
|
|
|
|
|
|
private final long totalHitsCount;
|
|
|
|
private final LLKeyScore[] hits;
|
|
|
|
|
|
|
|
public LLTopKeys(long totalHitsCount, LLKeyScore[] hits) {
|
|
|
|
this.totalHitsCount = totalHitsCount;
|
|
|
|
this.hits = hits;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long getTotalHitsCount() {
|
|
|
|
return totalHitsCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
public LLKeyScore[] getHits() {
|
|
|
|
return hits;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean equals(Object o) {
|
|
|
|
if (this == o) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (o == null || getClass() != o.getClass()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
LLTopKeys llTopKeys = (LLTopKeys) o;
|
|
|
|
return totalHitsCount == llTopKeys.totalHitsCount &&
|
|
|
|
Arrays.equals(hits, llTopKeys.hits);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int hashCode() {
|
|
|
|
int result = Objects.hash(totalHitsCount);
|
|
|
|
result = 31 * result + Arrays.hashCode(hits);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "LLTopKeys{" +
|
|
|
|
"totalHitsCount=" + totalHitsCount +
|
|
|
|
", hits=" + Arrays.toString(hits) +
|
|
|
|
'}';
|
|
|
|
}
|
|
|
|
}
|