public int compareTo(FacetValue other) {
if (this.sort.equals(Sort.BY_KEY)) {
return this.getKey().compareTo(other.getKey());
- } else {
- return this.getValue().compareTo(other.getValue());
}
+ return this.getValue().compareTo(other.getValue());
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof FacetValue)) return false;
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof FacetValue)) {
+ return false;
+ }
FacetValue that = (FacetValue) o;
-
- if (!key.equals(that.key)) return false;
- if (subFacets != null ? !subFacets.equals(that.subFacets) : that.subFacets != null) return false;
- if (!value.equals(that.value)) return false;
-
- return true;
+ if (!key.equals(that.key)) {
+ return false;
+ }
+ if (subFacets != null ? !subFacets.equals(that.subFacets) : that.subFacets != null) {
+ return false;
+ }
+ return value.equals(that.value);
}
@Override
@Override
public int compareTo(Hit hit) {
- if (this.getRank() != null) {
- return this.getRank().compareTo(hit.getRank());
- } else {
- return this.getScore().compareTo(hit.getScore());
+ if (getRank() != null) {
+ return getRank().compareTo(hit.getRank());
}
+ return getScore().compareTo(hit.getScore());
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof Hit)) return false;
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Hit)) {
+ return false;
+ }
Hit hit = (Hit) o;
-
- if (fields != null ? !fields.equals(hit.fields) : hit.fields != null) return false;
- if (rank != null ? !rank.equals(hit.rank) : hit.rank != null) return false;
- if (score != null ? !score.equals(hit.score) : hit.score != null) return false;
-
- return true;
+ if (fields != null ? !fields.equals(hit.fields) : hit.fields != null) {
+ return false;
+ }
+ if (rank != null ? !rank.equals(hit.rank) : hit.rank != null) {
+ return false;
+ }
+ return !(score != null ? !score.equals(hit.score) : hit.score != null);
}
@Override
}
@Override
- public Class<?> getPayloadClass() {
+ public Class getPayloadClass() {
return dto.getClass();
}
}
@Override
- public Class<?> getPayloadClass() {
+ public Class getPayloadClass() {
throw new IllegalStateException("Deletion by key does not have an object payload!");
}
}
@Override
- public Class<?> getPayloadClass() {
+ public Class getPayloadClass() {
return item.getClass();
}
public abstract String getKey();
- public abstract Class<?> getPayloadClass();
+ public abstract Class getPayloadClass();
public String getIndexType() {
return indexType;
}
@Override
- public Class<?> getPayloadClass() {
+ public Class getPayloadClass() {
return dto.getClass();
}
}
@Override
- public Class<?> getPayloadClass() {
+ public Class getPayloadClass() {
return item.getClass();
}