package com.changhong.epc.rely.api.tool.power.function; import com.googlecode.aviator.runtime.type.AviatorBoolean; import com.googlecode.aviator.runtime.type.AviatorObject; import java.util.ArrayList; import java.util.List; import java.util.Map; public class HideButton extends ShowButtonAbstractFunction { @Override public AviatorObject call(Map env, AviatorObject arg1) { addHideButton(env, arg1.stringValue(env)); return AviatorBoolean.TRUE; } protected void addHideButton(Map env, String buttonName){ List hides = (List) env.get("hide"); if(hides == null){ env.put("hide", hides = new ArrayList<>()); } hides.add(buttonName); } @Override public String getName() { return "hide"; } }