public boolean isComplete(){
synchronized (nodeStack) {
    return nodeStack.isEmpty() && retainedNodes.isEmpty();
  }
}

public boolean isComplete ( ) { synchronized ( nodeStack ) { return nodeStack . isEmpty ( ) && retainedNodes . isEmpty ( ) ; } }
this method determines if the fragment is complete .
