public synchronized void add(Node obj){
  ArrayList newList=new ArrayList<Node>(this.list);
  newList.add(obj);
  this.list=Collections.unmodifiableList(newList);
  incrementVersion();
}

public synchronized void add ( Node obj ) { ArrayList newList = new ArrayList < Node > ( this . list ) ; newList . add ( obj ) ; this . list = Collections . unmodifiableList ( newList ) ; incrementVersion ( ) ; }
adds obj to the list . addition is done by making a copy of the existing list and then adding the obj to the new list and assigning the old list to the new unmodifiable list . this is to ensure that the iterator of the list doesn ' t get concurrentmodificationexception .
