void validateState ( ) { if ( frames == null || coroutine == null ) { throw new IllegalStateException ( "Bad state" ) ; } for ( int i = 0 ; i < frames . length ; i ++ ) { if ( frames [ i ] == null ) { throw new IllegalStateException ( "Bad state" ) ; } frames [ i ] . validateState ( ) ; } }
method to do that .