question: public boolean isMainlineIndexed ( int index ) { RayTrack ray = null ; for ( int i = 0 ; ( i < rayList . size ( ) ) && ( ray == null ) ; i ++ ) { RayTrack r = rayList . get ( i ) ; if ( r . getConnectionIndex ( ) == index ) { ray = r ; } } if ( ray == null ) { return false ; } TrackSegment tr = ray . getConnect ( ) ; if ( tr == null ) { return false ; } return tr . getMainline ( ) ; }
target:  Methods to test if ray is a mainline track or not Returns true if connecting track segment is mainline Defaults to not mainline if connecting track segment is missing