Open EdgarACarneiro opened 3 years ago
Hello. Is this bug/missing feature still around? I'm a little confused because overwriting equals
is currently shown in the usage notes of the readme. If the bug is still around, a note in the readme might be a good idea.
I will be using I2Bplus-tree for a programming project in the context of my bachelor's thesis, and I'm open to contributing. Introducing the intervalEquals method seems like a good + fairly easy fix.
Hey @Nikovic thanks for your question - I need to take a deeper look into it since it has been a while I'll get back to you once I do so
The current implementation does not allow the overriding of the
FlatInterval.equals
method since internally someFlatInterval
objects are created to optimise data handling. As such, if one does override theequals
method with the new properties, thesearch
method brakes.Possible solutions:
FlatInterval
objects inside theI2BplusTree
and just use/ move around the valid times;intervalEquals
) that just makes the comparison of the intervals. Then, this method is used for comparison with theFlatInterval
objects inside the tree, while theequals
method is used for comparison between objects introduced by the user.