private void validateLayout(){
  List<String> missingIds=new ArrayList<String>();
  for (  String id : layout.stringKeySet()) {
    if (layout.getCell(id) == null) {
      missingIds.add(id);
    }
  }
  if (missingIds.size() > 0) {
    throw new IllegalStateException("No layout spec found for ids: " + missingIds);
  }
  for (  String cell : layout.getCells()) {
    String id=layout.parse(cell,LayoutConstants.ID);
    if (layout.get(id) == null) {
      missingIds.add(id);
    }
  }
  if (missingIds.size() > 0) {
    throw new IllegalStateException("No <T> or ID found for ids: " + missingIds);
  }
}

private void validateLayout ( ) { List < String > missingIds = new ArrayList < String > ( ) ; for ( String id : layout . stringKeySet ( ) ) { if ( layout . getCell ( id ) == null ) { missingIds . add ( id ) ; } } if ( missingIds . size ( ) > 0 ) { throw new IllegalStateException ( "No layout spec found for ids: " + missingIds ) ; } for ( String cell : layout . getCells ( ) ) { String id = layout . parse ( cell , LayoutConstants . ID ) ; if ( layout . get ( id ) == null ) { missingIds . add ( id ) ; } } if ( missingIds . size ( ) > 0 ) { throw new IllegalStateException ( "No <T> or ID found for ids: " + missingIds ) ; } }
checks the list of layout specs in the layout object against the number of t ids set to make sure they are the same and that all t ids have corresponding layout specs .
