Beispiel #1
0
        public void Insertar(Object elemento)
        {
            NodoLista aux = new NodoLista();

            aux.elemento = elemento;
            aux.enlace   = null;

            if (Inicio == null)
            {
                Inicio = aux;
            }
            else
            {
                NodoLista NodoActual;
                NodoActual = Inicio;

                while (NodoActual.enlace != null)
                {
                    NodoActual = NodoActual.enlace;
                }
                NodoActual.enlace = aux;
            }
            NumeroElementos++;
        }
Beispiel #2
0
 public void ReiniciarActual()
 {
     Actual = null;
 }
Beispiel #3
0
 public Object obtenerElemento(NodoLista nodo)
 {
     return(nodo.elemento);
 }
Beispiel #4
0
 public Lista()
 {
     Inicio = null;
     Actual = null;
 }