boolean isTerminated(){
synchronized (paragraphs) {
    for (    Paragraph p : paragraphs) {
      if (!p.isTerminated()) {
        return false;
      }
    }
  }
  return true;
}

boolean isTerminated ( ) { synchronized ( paragraphs ) { for ( Paragraph p : paragraphs ) { if ( ! p . isTerminated ( ) ) { return false ; } } } return true ; }
check whether all paragraphs belongs to this note has terminated
