Why not implement java.util.Comparator?

  • Alex Karasulu
    Alex Karasulu

    Your jdbm.helper.Comparator I know is implemented as an abstract class to guarrantee that it is Serializable.  However can you have it implement the java.util.Comparator class as well so that it can be used as one when pluggin in the same comparator class into the Java 2 Collections APIs. One problem I have is that I need to use the same key comparator for both the Btree and separately in a hash.  It would makes sense no?

    • Alex Boisvert
      Alex Boisvert

      Hi Alex,

      The CVS version of JDBM already has support for java.util.Comparator. 

      Generally speaking, after version 0.12 we have decided to use more Java idioms and adopt JDK 1.2 as the base platform.  (The use of Comparator was previously limited by the fact that we wanted to support JDK 1.1.x.)

      While I do not have immediate plans for releasing the CVS version, you might find it worthwhile to use this version for your own purposes.   The CHANGES.txt file should document all changes with respect to the version that you are currently using.