1 23 24 package org.objectweb.fractal.gui.model; 25 26 import java.util.ArrayList ; 27 import java.util.Collections ; 28 import java.util.List ; 29 30 34 35 public class SharedServerInterface extends SharedInterface 36 implements ServerInterface 37 { 38 39 43 44 private List bindings; 45 46 53 54 SharedServerInterface ( 55 final SharedComponent owner, 56 final Interface masterInterface) 57 { 58 super(owner, masterInterface); 59 bindings = new ArrayList (); 60 } 61 62 public List getBindings () { 63 return Collections.unmodifiableList(bindings); 64 } 65 66 72 73 void addBinding (final Binding binding) { 74 for (int i = 0; i < bindings.size(); ++i) { 75 Binding b = (Binding)bindings.get(i); 76 if (b.getClientInterface() == binding.getClientInterface() && b.getServerInterface() == binding.getServerInterface()) { 77 return; 78 } 79 } 80 bindings.add(binding); 81 } 82 83 89 90 void removeBinding (final Binding binding) { 91 bindings.remove(binding); 92 } 93 } 94 | Popular Tags |