Adding member functions in Node.java