protected int nextEdgeId ( ) { int nextEdge = edgeCount ; edgeCount ++ ; if ( edgeCount < 0 ) throw new IllegalStateException ( "too many edges. new edge id would be negative. " + toString ( ) ) ; edges . ensureCapacity ( ( ( long ) edgeCount + 1 ) * edgeEntryBytes ) ; return nextEdge ; }
Determine next free edgeId and ensure byte capacity to store edge