public Element < T > insertBefore ( Element < T > next , T object ) { Element < T > e = requestNew ( ) ; e . object = object ; e . previous = next . previous ; e . next = next ; if ( e . previous != null ) { e . previous . next = e ; } else { first = e ; } next . previous = e ; size ++ ; return e ; }
Inserts the object into a new element before the provided element .