@ SuppressWarnings ( "unchecked" ) private static < T extends Comparable < T > > int compare ( T o1 , T o2 ) { if ( o1 instanceof PMessage && o2 instanceof PMessage ) { return compareMessages ( ( PMessage ) o1 , ( PMessage ) o2 ) ; } return o1 . compareTo ( o2 ) ; }
Compare two values to each other .