public void run ( Runnable runnable ) { if ( this . goForward ( ) ) { for ( int i = this . from ; i <= this . to ; i += this . step ) { runnable . run ( ) ; } } else { for ( int i = this . from ; i >= this . to ; i += this . step ) { runnable . run ( ) ; } } }
This method runs a runnable a specified number of times against on the current thread .