Doubly linked list. Remove function and insert in this example

Could me someone help in this functions.

publicvoid Insert(Element el,int placeNr){

if (placeNr<= this.ElementCount()){

int i;

Element el1 = this.first;

Element newElement =new Element();

if ((el1 ==null)||(EilNr == 0)){

newElement = el.Copy();

newElement.next=this.first;

this.first = newElement;

}elsefor (i=1;(el1!=null)||(i<placeNr); i++){

if (i==placeNr){

newElement=el.Copy();

newElement.next=el1.next;

el1.next=newElement;

}

el1 = el1.next;

}

}

}

publicvoid Remove(int placeNr){

if ((placeNr>0)&&(placeNr<= this.ElementCount())){

int i;

if (this.first.next!=null)

{ Element el1 = this.first;

if (placeNr==1){this.first=el1.next;}else{

for (i=2; i<placeNr; i++){

el1 = el1.next;

}

el1.next = el1.next.next;

}

}else{this.first =null;}

}

}

I whant to rewrite theese functions to fit for Doubly Linked List. But i do not know how it to do. I know only that doubly linked list have 2 pointers first and tail or end pointer. Maybe someone have an example or tutorials for theese functions ? I need very very help for this>

[2726 byte] By [woogod@mail.rua] at [2007-10-2 2:07:53]
# 1
What you need first is to get clear about what a Double-Linked List looks like and how inserting/removing works. once you understood that, adding the code is rather easy.
CeciNEstPasUnProgrammeura at 2007-7-15 19:49:22 > top of Java-index,Java Essentials,Java Programming...
# 2

> What you need first is to get clear about what a

> Double-Linked List looks like and how

> inserting/removing works. once you understood that,

> adding the code is rather easy.

I fully agree. When I was learning data structures, if often scribbled diagrams on scrap paper or on empty blackboards. Once you understand how the "pointers" reference new "nodes", writing the methods become a piece of cake...sorry Ceci, le morceau de g鈚eau.

filestreama at 2007-7-15 19:49:22 > top of Java-index,Java Essentials,Java Programming...
# 3
Hi,Why you do no use or extend ArrayList java Object.
barbywarea at 2007-7-15 19:49:22 > top of Java-index,Java Essentials,Java Programming...
# 4
I need only to rewrite theese function to fit for Double-Linked List. I do not what to learn all data strucures. Only for this.
woogod@mail.rua at 2007-7-15 19:49:22 > top of Java-index,Java Essentials,Java Programming...