public <T extends NetworkObserver<N>> void detach(T networkObserver) { if (this.observers.contains(networkObserver)) { this.observers.remove(networkObserver); networkObserver.setNetwork(null); } }
public <T extends NetworkObserver<N>> void attach(T networkObserver) { if (!this.observers.contains(networkObserver)) { this.observers.add(networkObserver); networkObserver.setNetwork(this.getTrainer().getNetwork()); } }