private void checkState(){
  if (diagramRetrieved) {
    throw new IllegalStateException("The final diagram was returned and therefore no more changes are allowed.");
  }
}

private void checkState ( ) { if ( diagramRetrieved ) { throw new IllegalStateException ( "The final diagram was returned and therefore no more changes are allowed." ) ; } }
throws an exception if the diagram was already returned
