public DoubleNode deleteNode(DoubleNode node){
        DoubleNode store=null;
        if(listHead==null){
            return null;
        }
        else if(listHead.equals(node)){
            store=listHead;
            listHead=listHead.getNextNode();
            listHead.setPreviousNode(null);
        }
        DoubleNode current=listHead;
        while(current.getNextNode()!=null){
            if(current.equals(node)){
                store=current;
                DoubleNode temp;
                temp=current.getPreviousNode();
                current=current.getNextNode();
                temp.setNextNode(current);
                current.setPreviousNode(temp);
            }
            else{
                current=current.getNextNode();
            }
        }
        return store;
    }