src/textgen/MyLinkedList.java
/**
	 * Appends an element to the end of the list
	 * @param element The element to add
	 */
Appends an element to the end of the list
@param element The element to add
Appends an element to the end of the list @param element The element to add
public boolean add(E element ) {
		if(null==element){
			throw new NullPointerException();
		} else {
		LLNode <E> currentNode = new LLNode<E>(element);
		if(size()==0){ 
			currentNode.prev=head;
			currentNode.next=tail;
			tail.prev=currentNode;
			head.next=currentNode;
		} else { 
			currentNode.prev=tail.prev;
			currentNode.next=tail;
			tail.prev.next=currentNode;
			tail.prev=currentNode;
		}
		size++;
		return true;
		}
	}
public boolean add ( E element ) { if ( null == element ) { throw new NullPointerException ( ) ; } else { LLNode < E > currentNode = new LLNode < E > ( element ) ; if ( size ( ) == 0 ) { currentNode . prev = head ; currentNode . next = tail ; tail . prev = currentNode ; head . next = currentNode ; } else { currentNode . prev = tail . prev ; currentNode . next = tail ; tail . prev . next = currentNode ; tail . prev = currentNode ; } size ++ ; return true ; } }
Appends an element to the end of the list
 @param element The element to add
Appends an element to the end of the list @param element The element to add
// linked list is empty and curentNode is the first node //System.out.println(" hey my tail is "+ tail + "  hey my tail prev is :"+tail.prev); //tail.prev=new LLNode <E>(); //linked list is not empty and currentNode is not the first node //System.out.println( "added node "+currentNode);