Skip to content

Commit 698f040

Browse files
committed
remove equals
1 parent 1944e56 commit 698f040

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

roaringbitmap/src/main/java/org/roaringbitmap/art/BranchNode.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -212,37 +212,6 @@ public static void copyPrefix(BranchNode src, BranchNode dst) {
212212
*/
213213
public abstract Node remove(int pos);
214214

215-
@Override
216-
public boolean equals(Object obj) {
217-
if (this == obj) {
218-
return true;
219-
}
220-
if (!(obj instanceof BranchNode)) {
221-
return false;
222-
}
223-
BranchNode other = (BranchNode) obj;
224-
if (this.count != other.count) {
225-
return false;
226-
}
227-
if (!(Arrays.equals(this.prefix, other.prefix))) {
228-
return false;
229-
}
230-
int pos = ILLEGAL_IDX;
231-
while ((pos = this.getNextLargerPos(pos)) != ILLEGAL_IDX) {
232-
byte key = this.getChildKey(pos);
233-
int otherPos = other.getChildPos(key);
234-
if (otherPos == ILLEGAL_IDX) {
235-
return false;
236-
}
237-
Node child = this.getChild(pos);
238-
Node otherChild = other.getChild(otherPos);
239-
if (!child.equals(otherChild)) {
240-
return false;
241-
}
242-
}
243-
return true;
244-
}
245-
246215
@Override
247216
long serializeSizeInBytes(HighLowContainer highLow) {
248217
// count, prefix length + prefix

0 commit comments

Comments
 (0)