public static class NullEdgeInitializedTransition implements
MultipleArcTransition<VertexImpl, VertexEvent, VertexState> {
@Override
public VertexState transition(VertexImpl vertex, VertexEvent vertexEvent) {
VertexEventNullEdgeInitialized event = (VertexEventNullEdgeInitialized) vertexEvent;
Edge edge = event.getEdge();
Vertex otherVertex = event.getVertex();
Preconditions.checkState(
vertex.getState() == VertexState.NEW
|| vertex.getState() == VertexState.INITIALIZING,
"Unexpected state " + vertex.getState() + " for vertex: "
+ vertex.logIdentifier);