package com.github.dkanellis.skyspark.performance.parsing;

import com.beust.jcommander.IStringConverter;
import com.github.dkanellis.skyspark.api.algorithms.Preconditions;
import com.github.dkanellis.skyspark.api.algorithms.sparkimplementations.Bitmap;
import com.github.dkanellis.skyspark.api.algorithms.sparkimplementations.BlockNestedLoop;
import com.github.dkanellis.skyspark.api.algorithms.sparkimplementations.SkylineAlgorithm;
import com.github.dkanellis.skyspark.api.algorithms.sparkimplementations.SortFilterSkyline;

public class SkylineAlgorithmConverter implements IStringConverter<SkylineAlgorithm> {
    @Override
    public SkylineAlgorithm convert(String value) {
        Preconditions.checkNotEmpty(value);
        value = value.toLowerCase();

        switch (value) {
            case "bnl":
                return new BlockNestedLoop();
            case "sfs":
                return new SortFilterSkyline();
            case "bitmap":
                return new Bitmap();
            default:
                throw new IllegalArgumentException("Wrong algorithm value: " + value);
        }
    }
}

@@ -99,16 +99,64 @@
 verter;%0A
+import com.beust.jcommander.ParameterException;%0A
 import c
@@ -1086,23 +1086,17 @@
 new 
-IllegalArgument
+Parameter
 Exce

Add correct exception