コード例 #1
0
 public <T extends NetworkObserver<N>> void detach(T networkObserver) {
   if (this.observers.contains(networkObserver)) {
     this.observers.remove(networkObserver);
     networkObserver.setNetwork(null);
   }
 }
コード例 #2
0
 public <T extends NetworkObserver<N>> void attach(T networkObserver) {
   if (!this.observers.contains(networkObserver)) {
     this.observers.add(networkObserver);
     networkObserver.setNetwork(this.getTrainer().getNetwork());
   }
 }