@ Pure public int lastIndexOf ( RoadSegment segment ) { int count = 0 ; int index ; int lastIndex = - 1 ; for ( final RoadPath p : this . paths ) { index = p . lastIndexOf ( segment ) ; if ( index >= 0 ) { lastIndex = count + index ; } count += p . size ( ) ; } return lastIndex ; }
Replies the index of the last occurrence . of the given road segment .