public static CleanupMode parse(String param) {
        if (param == null || param.equalsIgnoreCase("try")) {
            return TRY_TO_REMOVE;
        } else if (param.equalsIgnoreCase("false") || param.equalsIgnoreCase("none")) {
            return NONE;
        } else if (param.equalsIgnoreCase("true") || param.equalsIgnoreCase("remove")) {
            return REMOVE;
        } else {
            throw new IllegalArgumentException("Invalid clean up mode " + param + " (should be one of: none/try/remove)");
        }
    }
Mode specifying how a cleanup should be performed.

@author roland
@since 01/03/16
src/main/java/io/fabric8/maven/docker/config/CleanupMode.java