Basic graph representation in java ver 1.0