IFileImporter
4445464748495051525354
switch (type) { case CSV: importer = new CSVFileImporter(importFile); break; case XLS: importer = new ExcelFileImporter(importFile); break; default: throw new IllegalArgumentException("No such type: " + type.toString()); } return importer;