@ Override public int compareTo ( Object obj ) { int result = - 1 ; if ( obj instanceof AbstractPlugin ) { AbstractPlugin test = ( AbstractPlugin ) obj ; if ( getId ( ) < test . getId ( ) ) { result = - 1 ; } else if ( getId ( ) > test . getId ( ) ) { result = 1 ; } else { result = 0 ; } } return result ; }
Compare if 2 plugin is the same .