public abstract class Piece implements Comparable{ //Note: This could also obviously return Piece public abstract T collide(T other); } public class ChessPiece extends Piece { public ChessPiece collide(ChessPiece other) { return this; } public int compareTo(ChessPiece arg0) { // TODO Auto-generated method stub return 0; } } public class RPGPiece extends Piece{ public int compareTo(RPGPiece o) { // TODO Auto-generated method stub return 0; } @Override public RPGPiece collide(RPGPiece other) { return this.compareTo(other) > 0 ? this: other; } }