Graph ADT in Java