Exemplo n.º 1
0
    public int lengt()
    {
        NodoStudent aux = begin;
        int         i   = 0;

        while (aux != null)
        {
            i++;
            aux = aux.next;
        }
        return(i);
    }
Exemplo n.º 2
0
    public bool passMatchAndMail(string email, string pass)
    {
        NodoStudent aux = begin;
        bool        f   = false;

        while (aux != null)
        {
            if (aux.student.email == email && aux.student.password == pass)
            {
                f = true;
            }
            aux = aux.next;
        }
        return(f);
    }
    public void add(Studient s)
    {
        NodoStudent n = new NodoStudent(s, null, null);

        if (isEmpty())
        {
            begin = end = n;
        }
        else
        {
            begin.setBefore(n);
            n.setNext(begin);
            begin = n;
        }
    }
Exemplo n.º 4
0
    public Student searchName(string name)
    {
        NodoStudent aux    = begin;
        Student     studen = null;

        while (aux != null)
        {
            if (aux.student.name == name)
            {
                studen = aux.student;
                Debug.Log("done");
            }
            aux = aux.next;
        }
        return(studen);
    }
Exemplo n.º 5
0
    public Student searchMail(string email)
    {
        NodoStudent aux    = begin;
        Student     studen = null;

        while (aux != null)
        {
            if (aux.student.email == email)
            {
                Debug.Log("done email");
                studen = aux.student;
            }
            aux = aux.next;
        }
        return(studen);
    }
    public Studient searchName(NodoStudent aux, string name)
    {
        Studient valid = null;

        if (aux != null)
        {
            if (aux.studient.name == name)
            {
                valid = aux.studient;
            }
            else
            {
                valid = searchName(aux.next, name);
            }
        }
        return(valid);
    }
Exemplo n.º 7
0
 public NodoStudent(Student studient, NodoStudent before, NodoStudent next)
 {
     this.student = studient;
     this.before  = before;
     this.next    = next;
 }
Exemplo n.º 8
0
 public NodoStudent getNext(NodoStudent next)
 {
     return(next);
 }
Exemplo n.º 9
0
 public NodoStudent getBefore(NodoStudent before)
 {
     return(before);
 }
Exemplo n.º 10
0
 public void setNext(NodoStudent next)
 {
     this.next = next;
 }
Exemplo n.º 11
0
 public void setBefore(NodoStudent before)
 {
     this.before = before;
 }