public int compare(Object o1, Object o2) { if (o1 instanceof CachedMethod) return ((CachedMethod)o1).compareTo(o2); else if (o2 instanceof CachedMethod) return -((CachedMethod)o2).compareTo(o1); else // really, this should never happen, it's evidence of corruption if it does throw new ClassCastException("One of the two comparables must be a CachedMethod"); } }
public int compare(Object o1, Object o2) { if (o1 instanceof CachedMethod) return ((CachedMethod)o1).compareTo(o2); else if (o2 instanceof CachedMethod) return -((CachedMethod)o2).compareTo(o1); else // really, this should never happen, it's eveidence of corruption if it does throw new ClassCastException("One of the two comperables must be a CachedMethod"); } }
public int compare(Object o1, Object o2) { if (o1 instanceof CachedMethod) return ((CachedMethod)o1).compareTo(o2); else if (o2 instanceof CachedMethod) return -((CachedMethod)o2).compareTo(o1); else // really, this should never happen, it's evidence of corruption if it does throw new ClassCastException("One of the two comparables must be a CachedMethod"); } }
public int compare(Object o1, Object o2) { if (o1 instanceof CachedMethod) return ((CachedMethod)o1).compareTo(o2); else if (o2 instanceof CachedMethod) return -((CachedMethod)o2).compareTo(o1); else // really, this should never happen, it's eveidence of corruption if it does throw new ClassCastException("One of the two comperables must be a CachedMethod"); } }
public int compare(Object o1, Object o2) { if (o1 instanceof CachedMethod) return ((CachedMethod)o1).compareTo(o2); else if (o2 instanceof CachedMethod) return -((CachedMethod)o2).compareTo(o1); else // really, this should never happen, it's eveidence of corruption if it does throw new ClassCastException("One of the two comperables must be a CachedMethod"); } }