KilianB / JImageHash

Perceptual image hashing library used to match similar images
MIT License
397 stars 80 forks source link

Hash class to implement Compareable #64

Open Hummus-Ful opened 2 years ago

Hummus-Ful commented 2 years ago

Hey,

I use a HashMap object to store key, value pairs where the Hash object of each photo is used as a key. I tried switching to TreeMap object as it provides automatic sorting of the entries it stores, but because the Hash class does not implements Compareable, I cant use Hash as key anymore and I have to workaround using BigInteger (using the getHashValue) or converting the Hash to string object.

If possible, I would like Hash class to implement Compareable so it can be used directly in a TreeMap.