public boolean isEmpty(){
synchronized (actions) {
    if (allowToChange) {
      return actions.isEmpty();
    }
  }
  return true;
}

public boolean isEmpty ( ) { synchronized ( actions ) { if ( allowToChange ) { return actions . isEmpty ( ) ; } } return true ; }
indicates whether this instantrunnable is empty .
