// the lesson this is not collision with the lesson 2 before or after public bool isntCollision(Lesson l2) { checkNullArgumant(l2, "השיעור השני שאיתו אתה מנסה לבדוק שהוא לא מתנגש עם שיעור שלך , לא הוגדר"); return(!isCollision(l2)); }
// the lesson this is collision with the lesson 2 before or after public bool isCollision(Lesson l2) { checkNullArgumant(l2, "השיעור השני שאיתו אתה מנסה לבדוק שהוא מתנגש עם שיעור שלך , לא הוגדר"); return(this >= l2 || this <= l2); }
public bool collisionAfter(Lesson lsn) { return(this.getShortDay().CompareTo(lsn.getShortDay()) == 0 && this.start >= lsn.start && this.start < lsn.end); }
public bool collisionBefore(Lesson lsn) { return(this.getShortDay().CompareTo(lsn.getShortDay()) == 0 && this.start <= lsn.start && this.end > lsn.start); }
public bool After(Lesson lsn) { return((this.getShortDay().CompareTo(lsn.getShortDay()) > 0) || (this.getShortDay().CompareTo(lsn.getShortDay()) == 0 && this.start >= lsn.end)); }
public bool Before(Lesson lsn) { return((this.getShortDay().CompareTo(lsn.getShortDay()) < 0) || (this.getShortDay().CompareTo(lsn.getShortDay()) == 0 && this.end <= lsn.start)); }