Example #1
0
        public Dados Retirar(Object obj)
        {
            Elemento aux = this.prim;

            while ((aux.prox != null) && (!aux.prox.d.Equals(obj)))
            {
                aux = aux.prox;
            }
            if (aux.prox != null)
            {
                Elemento auxRet = aux.prox;
                aux.prox = auxRet.prox;
                if (auxRet == this.ult)
                {
                    this.ult = aux;
                }
                else
                {
                    auxRet.prox = null;
                }
                return(auxRet.d);
            }
            return(null);
        }
Example #2
0
 public Elemento(Dados d)
 {
     this.d    = d;
     this.prox = null;
 }
Example #3
0
 public Lista()
 {
     this.prim = new Elemento(null);
     this.ult  = this.prim;
 }