Exemplo n.º 1
0
 public void insertar(T item)
 {
     if (isEmpty())
     {
         raiz = fin = new Nodos.Node <T>(item);
     }
     else
     {
         fin.siguiente          = new Nodos.Node <T>(item);
         fin.siguiente.anterior = fin;
         fin = fin.siguiente;
     }
     count++;
 }
Exemplo n.º 2
0
 public Nodos.Node <T> sacar()
 {
     if (isEmpty())
     {
         return(null);
     }
     else
     {
         Nodos.Node <T> aux = raiz;
         raiz = raiz.siguiente;
         if (!isEmpty())
         {
             raiz.anterior = null;
         }
         count--;
         return(aux);
     }
 }
Exemplo n.º 3
0
 public ListaD()
 {
     raiz  = fin = null;
     count = 0;
 }