public void Remove(VacCat cat) { if (Next is null) { return; } if (Next.VacCat == cat) { Next = Next.Next; } Next.Remove(cat); }
public void RegisterPerson(T1 newPerson, VacCat vacCat) { if (Head == null) { Head = new VaccAssigner(newPerson, vacCat); return; } if (Head.VacCat.CompareTo(vacCat) > 0) { Head = new VaccAssigner(newPerson, vacCat) { Next = Head }; return; } if (Head.Next is null) { Head.Next = new VaccAssigner(newPerson, vacCat); return; } Head.Add(new VaccAssigner(newPerson, vacCat)); }
public VaccAssigner(T1 newPerson, VacCat newVacCat) { Person = newPerson; VacCat = newVacCat; }