Paul Clapham wrote:If you have "degrees" of similarity -- i.e. one object can be "more similar" to an object than a second object is -- then an "equals" method isn't going to be of any use. You want a "similarity" method which returns a number between 0 and 1, or between 1 and 100, or between negative infinity and positive infinity, whatever the possibilities are.
Then you need a method which scans the list and picks the member X for which similarity(X, Base) is maximized.