package com.capgemini.reports.reports.parameters;

/**
 * This class represent the choice of using mono-level or multi-level BOM explosion.
 *
 */
public enum MonoMulti {
    /** The MONO type of resolution structure. */
    MONO,
    /** The MULTI type of resolution structure. */
    MULTI;

    /**
     * Constructs a {@link MonoMulti} according to user input.
     *
     * @param input a String containing the user input.
     * @return the {@link MonoMulti}
     */
    public static MonoMulti build(final String input) {
        // Checking mono-multi
        if ("multi".equalsIgnoreCase(input)) {
            return MULTI;
        }
        else {
            return MONO;
        }
    }
}
