Le compilateur dit " cannot find symbol : method compareTo(java.lang.Object) ". Pourriez-vous m'indiquer où se situe l'erreur ?
Voici la partie du code :
public class OBTComparable<ObjectType> implements Comparable<OBTComparable>
{
public OTBComparable leftNode = null;
public OBTComparable mainNode = null;
public OBTComparable rightNode = null;
public ObjectType object = null;
public OBTComparable(ObjectType requiredObject)
{
object = requiredObject;
}
@Override
public int compareTo(OBTComparable other)
{
if(object.compareTo(other.object) == 0)
return 0;
else
if (object.compareTo(other.object) > 0)
return 1;
else return -1;
}
}