public int lengt() { NodoStudent aux = begin; int i = 0; while (aux != null) { i++; aux = aux.next; } return(i); }
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; } }
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); }
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); }
public NodoStudent(Student studient, NodoStudent before, NodoStudent next) { this.student = studient; this.before = before; this.next = next; }
public NodoStudent getNext(NodoStudent next) { return(next); }
public NodoStudent getBefore(NodoStudent before) { return(before); }
public void setNext(NodoStudent next) { this.next = next; }
public void setBefore(NodoStudent before) { this.before = before; }