posted 21 years ago
You are typecasting an oject or something that the comparator doesn't like (unComparable). Thus, when your method is supposed to return a comaprator, it dishes out the class cast exc.
Or the method that you are calling is not compiling at runtime due to a method call that returns a value that is not accepted by the other method making the call.
For instance:
public Marble getMarble(){return m};
public Object getDiameter(){
//if this method returns an Oject
then the typecast to a marble object is required.
this is where your's is hanging up:
VariateMetric vm1 = (VariateMetric) o1;
VariateMetric vm2 = (VariateMetric) o2;
o1 and o2 are at runtime not comparable.
[ April 22, 2004: Message edited by: Gabriel White ]