code: private static boolean _isAllOfSameType(Node[] nodes, short type) {
  	for (int i = 0; i < nodes.length; i++) {
  	    if (nodes[i].getNodeType() != type) return false;
  	}
  	return true;
      }
docs: Check if all Node are of the type defnined by para,meter
  
  @param nodes nodes to check
  @param type to compare
  @return are all of the same type