private void verifyIsRoot(){
  if (hierarchyElements.size() != 0) {
    throw new IllegalStateException("This is not the root. Can " + "only call addCounter() on the root node. Current node: " + hierarchy);
  }
}

private void verifyIsRoot ( ) { if ( hierarchyElements . size ( ) != 0 ) { throw new IllegalStateException ( "This is not the root. Can " + "only call addCounter() on the root node. Current node: " + hierarchy ) ; } }
verify that this node is the root
