int JComplex::compareTo(const JObject& s) const { if (className() != s.className()) return JObject::compareTo(s); return cmp(value.norm(), ((JComplex*)&s)->value.norm()); }
int JRandom::compareTo(const JObject& s) const { if (className() != s.className()) return JObject::compareTo(s); return seed - ((JRandom*)&s)->seed; }
int JColor::compareTo(const JObject& s) const { if (className() != s.className()) return JObject::compareTo(s); return value - (*(JColor*)&s).value; }
int JPObject::compareTo(const JObject& s) const { if (className() != s.className()) return false; return obj-((JPObject*)&s)->obj; }