Ejemplo n.º 1
0
 public int compareTo(ClassTimeInfo time) {
   int cmp = getDate().compareTo(time.getDate());
   if (cmp != 0) return cmp;
   cmp = getTimePattern().compareTo(time.getTimePattern());
   if (cmp != 0) return cmp;
   cmp = getDayCode() - time.getDayCode();
   if (cmp != 0) return cmp;
   cmp = getStartSlot() - time.getStartSlot();
   if (cmp != 0) return cmp;
   return hashCode() - time.hashCode();
 }
Ejemplo n.º 2
0
 public boolean shareWeeks(ClassTimeInfo anotherLocation) {
   return getDate().getPattern().intersects(anotherLocation.getDate().getPattern());
 }