use an array to represent the keys in the uid filter
fix equals and hashcode as well
This commit is contained in:
parent
dfe6e58e37
commit
cecb762ede
|
@ -39,7 +39,7 @@ import java.util.List;
|
||||||
|
|
||||||
public class UidFilter extends Filter {
|
public class UidFilter extends Filter {
|
||||||
|
|
||||||
private final Term[] uids;
|
final Term[] uids;
|
||||||
|
|
||||||
private final BloomCache bloomCache;
|
private final BloomCache bloomCache;
|
||||||
|
|
||||||
|
@ -96,7 +96,12 @@ public class UidFilter extends Filter {
|
||||||
if (this == o) return true;
|
if (this == o) return true;
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
UidFilter uidFilter = (UidFilter) o;
|
UidFilter uidFilter = (UidFilter) o;
|
||||||
return !uids.equals(uidFilter.uids);
|
return Arrays.equals(uids, uidFilter.uids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Arrays.hashCode(uids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -110,9 +115,4 @@ public class UidFilter extends Filter {
|
||||||
}
|
}
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return uids.hashCode();
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue