question: public Marker backTo ( int idx ) throws AMConsoleException { int size = trail . size ( ) ; if ( idx >= size ) { throw new AMConsoleException ( "cannot be discard items in page trail" ) ; } for ( int i = size - 1 ; i > idx ; -- i ) { trail . remove ( i ) ; } return ( Marker ) trail . get ( idx ) ; }
target:  Discards items from a given index (exclusive) to the end.