示例#1
0
        // ovde je parametar metoda tipa T
        public void DodajNaPocetak(T t)
        {
            CvorListe n = new CvorListe(t);

            n.Sledeci = glava;
            glava     = n;
        }
示例#2
0
        public IEnumerator <T> GetEnumerator()
        {
            CvorListe current = glava;

            while (current != null)
            {
                yield return(current.Podatak);

                current = current.Sledeci;
            }
        }
示例#3
0
 // konstruktor liste
 public JednostrukoPovezanaLista()
 {
     glava = null;
 }
示例#4
0
 // ovde se parametar tipa T koristi u negenerickom konstruktoru
 public CvorListe(T t)
 {
     sledeci = null;
     podatak = t;
 }