Remove call to getClass from hashCode implementations.

This commit is contained in:
Isabel Drost-Fromm 2016-09-07 11:53:39 +02:00
parent 333b769871
commit efbef20361
7 changed files with 7 additions and 7 deletions

View File

@ -225,6 +225,6 @@ public class DiscountedCumulativeGainAt extends RankedListQualityMetric {
@Override
public final int hashCode() {
return Objects.hash(getClass(), position, normalize, unknownDocRating);
return Objects.hash(position, normalize, unknownDocRating);
}
}

View File

@ -197,6 +197,6 @@ public class PrecisionAtN extends RankedListQualityMetric {
@Override
public final int hashCode() {
return Objects.hash(getClass(), n);
return Objects.hash(n);
}
}

View File

@ -169,6 +169,6 @@ public class RankEvalSpec extends ToXContentToBytes implements Writeable {
@Override
public final int hashCode() {
return Objects.hash(getClass(), specId, ratedRequests, metric);
return Objects.hash(specId, ratedRequests, metric);
}
}

View File

@ -136,6 +136,6 @@ public class RatedDocument extends ToXContentToBytes implements Writeable, FromX
@Override
public final int hashCode() {
return Objects.hash(getClass(), key, rating);
return Objects.hash(key, rating);
}
}

View File

@ -139,6 +139,6 @@ public class RatedDocumentKey extends ToXContentToBytes implements Writeable, Fr
@Override
public final int hashCode() {
return Objects.hash(getClass(), index, type, docId);
return Objects.hash(index, type, docId);
}
}

View File

@ -225,6 +225,6 @@ public class RatedRequest extends ToXContentToBytes implements Writeable {
@Override
public final int hashCode() {
return Objects.hash(getClass(), specId, testRequest, indices.hashCode(), types.hashCode(), ratedDocs.hashCode());
return Objects.hash(specId, testRequest, indices.hashCode(), types.hashCode(), ratedDocs.hashCode());
}
}

View File

@ -187,6 +187,6 @@ public class ReciprocalRank extends RankedListQualityMetric {
@Override
public final int hashCode() {
return Objects.hash(getClass(), maxAcceptableRank);
return Objects.hash(maxAcceptableRank);
}
}