Added swap()for NodeId.