weniger static

This commit is contained in:
Johannes Theiner 2018-06-07 18:22:10 +02:00
parent 2dd8cc4f39
commit cb37a78d60
1 changed files with 8 additions and 8 deletions

View File

@ -8,11 +8,16 @@ import java.util.concurrent.*;
public class KlausurenServer {
private ConcurrentMap<String, TreeSet<Integer>> data = new ConcurrentHashMap<>();
private static ExecutorService executorService = Executors.newCachedThreadPool();
private static ServerSocket serverSocket;
private ExecutorService executorService = Executors.newCachedThreadPool();
private ServerSocket serverSocket;
private static Map<String, CommandHandler> commands = new HashMap<>();
static Map<String, CommandHandler> getCommands() {
return commands;
}
private boolean running;
public KlausurenServer(int port) {
@ -50,9 +55,8 @@ public class KlausurenServer {
set.forEach((key, value) -> set.forEach((s, integers) -> {
if(!value.equals(integers)) {
if (integers.containsAll(value)) {
if (integers.containsAll(value))
set.remove(key);
}
}
}));
@ -159,10 +163,6 @@ public class KlausurenServer {
}
}
static Map<String, CommandHandler> getCommands() {
return commands;
}
public static void main(String[] args) {
new KlausurenServer(Integer.parseInt(args[0]));
}