It is also plausible to push a template into the PQ implementation or into the insertion code that is being duplicated. Then the same code can type check and handle both cases.
If the lucene PQ doesn't handle templating, then the code can just be lifted and fixed. On Sat, Nov 12, 2011 at 12:58 PM, Sean Owen <sro...@gmail.com> wrote: > You can overload, say, SimilarUser and GenericRecommendedItem. They're > both an ID and a floating-point value. What do you call it -- > EntityScore? It probably harms readability ever so slightly, > especially as it also has to implement the RecommendedItem interface. > toString() would change. I don't object, I don't really think it > helps. >