Your generic type could be forced to implement a certain interface wich does the comparison in a seperate method. With this version your class T could also be dereived from another class.
public interface CompareToInt {
public boolean less(int that);
}
Your class with your method:
public class Dummy<T extends CompareToInt> {
void method(T k){
if (k.less(10)){
// ... do stuff
}
}
}
edit:
my solution was inspired by popalka's