class AbstractWeightRandomLoadBalanceAdapter<T> {
    protected PluginAdapter pluginAdapter;
    protected PluginContextHolder pluginContextHolder;

    public AbstractWeightRandomLoadBalanceAdapter(PluginAdapter pluginAdapter) {
        this(pluginAdapter, null);
    }

    public AbstractWeightRandomLoadBalanceAdapter(PluginAdapter pluginAdapter, PluginContextHolder pluginContextHolder) {
        this.pluginAdapter = pluginAdapter;
        this.pluginContextHolder = pluginContextHolder;
    }

    public boolean checkWeight(List<Server> serverList, T t) {<FILL_FUNCTION_BODY>}

    public abstract T getT();

    public abstract int getWeight(Server server, T t);
}

        for (Server server : serverList) {
            int weight = getWeight(server, t);
            if (weight < 0) {
                return false;
            }
        }

        return true;
    
<no_super_class>