~fredericp/zaluum/wip-ide

« back to all changes in this revision

Viewing changes to org.zaluum.util/src/org/zaluum/util/ObservableImpl.java

  • Committer: Frederic Perez Ordeig
  • Date: 2009-12-17 16:27:19 UTC
  • Revision ID: frederic@zaluum.com-20091217162719-wplg8lm7zbr1jfgu
Refactored box cloning
Port name acts as an id and cannot be duplicated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import java.util.concurrent.CopyOnWriteArrayList;
23
23
 
 
24
import com.google.common.base.Preconditions;
 
25
 
24
26
/**
25
27
 * @author frede
26
28
 *
33
35
                list = new CopyOnWriteArrayList<Observer>();
34
36
        }
35
37
        public void addObserver(Observer o){
 
38
                Preconditions.checkNotNull(o);
36
39
                list.add(o);
37
40
        }
38
41
        public void removeObserver(Observer o){