public void setChapterNumber ( int number ) { numbers . set ( numbers . size ( ) - 1 , Integer . valueOf ( number ) ) ; Object s ; for ( Iterator i = iterator ( ) ; i . hasNext ( ) ; ) { s = i . next ( ) ; if ( s instanceof Section ) { ( ( Section ) s ) . setChapterNumber ( number ) ; } } }
Changes the Chapter number .