private void giveMatch ( final String uri , List < Route > routes ) { routes . stream ( ) . sorted ( ( o1 , o2 ) -> { if ( o2 . getPath ( ) . equals ( uri ) ) { return o2 . getPath ( ) . indexOf ( uri ) ; } return - 1 ; } ) ; }
Sort of path