public DistanceElement getElement ( long id ) { if ( ! vector . containsKey ( id ) ) vector . put ( id , new DistanceElement ( id ) ) ; return vector . get ( id ) ; }
Gets an element of the distance vector based on the given node id . If a DistanceElement object with the given id does not exist in the vector a new object with the id is added to it . Then the element with the given id as key is returned in the end .