
package worldserver3d.thread;

import java.util.ArrayList;

public class ServerThreadList extends ArrayList<ServerThread> {

    public void remove(ServerThread e) {
        super.remove(e);
    }

    public boolean startAndAdd(ServerThread e) {
        if (null != e) {
            e.start();
        }
        return super.add(e);
    }

    public synchronized void disconnectAll() {
        for (ServerThread e : this) {
            if (null != e) {
                e.disconnect();
            }
        }
    }
}
