package com.ctrip.ops.sysdev.fieldDeleter;

import com.ctrip.ops.sysdev.fieldDeleter.MultiLevelDeleter;
import com.ctrip.ops.sysdev.fieldDeleter.OneLevelDeleter;

import java.util.Map;
import java.util.regex.Pattern;

/**
 * Created by liujia on 17/2/23.
 */
public interface FieldDeleter {
    Pattern p = Pattern.compile("\\[\\S+\\]+");

    public Map delete(Map event);

    public static FieldDeleter getFieldDeleter(String field) {
        if (p.matcher(field).matches()) {
            return new MultiLevelDeleter(field);
        }
        return new OneLevelDeleter(field);
    }
}

@@ -41,127 +41,8 @@
 r;%0A%0A
-import com.ctrip.ops.sysdev.fieldDeleter.MultiLevelDeleter;%0Aimport com.ctrip.ops.sysdev.fieldDeleter.OneLevelDeleter;%0A%0A
 impo

remove unused import