Sorry, the bad news is that you cannot do this:
public class Algorithm> {
public void compute(Set objects) {
}
public void compute(Set> pairs) {
}
}
Due to erasure, both will erase to the same signature. There is no way around this short of renaming one of the methods.