public void insertBefore ( Vertex vtx , Vertex next ) { vtx . prev = next . prev ; if ( next . prev == null ) { head = vtx ; } else { next . prev . next = vtx ; } vtx . next = next ; next . prev = vtx ; }
Inserts a vertex into this list before another specificed vertex .