How bout having your find function take a java.util.Comparator object as a parameter instead? Then the caller can pass in
whatever comparison method he wants by implementing his own specification for the compare(Obj o1, Obj o2) method and passing it in with his criteria. The find function wouldn't know the difference in comparison methods; it'd just be calling compare(str1, str2) regardless of the type.
I started out with your idea but went with this since it was more extensible. Just my $0.02
Regards,
Paul