public SimEntity(String name){
  if (name.indexOf(" ") != -1) {
    throw new IllegalArgumentException("Entity names can't contain spaces.");
  }
  this.name=name;
  id=-1;
  state=RUNNABLE;
  CloudSim.addEntity(this);
}

public SimEntity ( String name ) { if ( name . indexOf ( " " ) != - 1 ) { throw new IllegalArgumentException ( "Entity names can't contain spaces." ) ; } this . name = name ; id = - 1 ; state = RUNNABLE ; CloudSim . addEntity ( this ) ; }
creates a new entity .
