@ Override public int compareTo ( ControllerRouteModel rElem ) { if ( rElem == null ) { throw new NullPointerException ( "Cannot compare to null" ) ; } if ( rElem . equals ( this ) ) { return 0 ; } int compare = getPath ( ) . compareTo ( rElem . getPath ( ) ) ; if ( compare == 0 ) { compare = getHttpMethod ( ) . compareTo ( rElem . getHttpMethod ( ) ) ; if ( compare == 0 ) { compare = getMethodName ( ) . compareTo ( rElem . getMethodName ( ) ) ; } } return compare ; }
A bit dummy compareTo implementation use by the tree Map .