* Example : A->B:3,C:5,D:25 is split into vertexToEdges[0] = A
* vertexToEdges[1] = B:3,C:5,D:25
*/
String[] vertexToEdges = adjacencyListRecord.split(vertexToEdgesSep);
if (vertexToEdges.length != 2) {
throw new IllegalInputException(adjacencyListRecord);
}
int vertexID = -1;
try {
vertexID = Integer.parseInt(vertexToEdges[0]);
} catch (NumberFormatException e) {
throw new IllegalInputException(adjacencyListRecord);
}
if (vertexID < 0) {
throw new IllegalInputException(adjacencyListRecord);
}
this.setVertexID(vertexID);
this.setValue(JPregelConstants.INFINITY);