I'm not sure what you are asking...the BNode class you posted already has a getKey method.