public Geometry drawWorkGeometry() { if (!this.workBuilding2size.isEmpty()) { return MathHelpers.draw(this.workBuilding2size, this.workBuildingSizeSum, this.rnd) .getGeometry(); } else { Logger.getLogger(this.getClass().getName()) .warning( "Could not fine work building in zone " + this.zoneId + "; falling back to zone geometry."); return this.getGeometry(); } }
public Geometry drawHomeGeometry(final String buildingType) { if (VILLA.equals(buildingType) && !this.villas.isEmpty()) { return this.villas.get(this.rnd.nextInt(this.villas.size())).getGeometry(); } else if (APARTMENT.equals(buildingType) && !this.apartmentBuilding2size.isEmpty()) { return MathHelpers.draw(this.apartmentBuilding2size, this.apartmentBuildingSizeSum, this.rnd) .getGeometry(); } else { Logger.getLogger(this.getClass().getName()) .warning( "Could not fine home building of type " + buildingType + " in zone " + this.zoneId + "; falling back to zone geometry."); return this.getGeometry(); } }