public boolean addElement(Object obj){
synchronized (actions) {
    if (allowToChange) {
      return actions.add(obj);
    }
  }
  return false;
}

public boolean addElement ( Object obj ) { synchronized ( actions ) { if ( allowToChange ) { return actions . add ( obj ) ; } } return false ; }
adds an element to this instantrunnable .
