resources
Class Conflict

java.lang.Object
  extended by resources.Conflict
All Implemented Interfaces:
java.io.Serializable, Constants

public class Conflict
extends java.lang.Object
implements Constants, java.io.Serializable

This class contains information regarding a conflict between 2 Sched objects. The reason detected, eg., professor or the room has been double-booked is also maintained here.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface resources.Constants
BUILDING, COURSE, COURSE_FIELD, COURSE_NUMBER, LASTNAME, NAME, PROF_DOUBLE_BOOKED, ROOM, ROOM_DOUBLE_BOOKED, SECTION_NUMBER
 
Constructor Summary
Conflict(SchedCourse sched1, SchedCourse sched2, int reason)
           
 
Method Summary
 int getReason()
          Gets the Reason
 SchedCourse getSched1()
          Gets Schedule 1
 SchedCourse getSched2()
          Gets Schedule 2
 java.lang.String toString()
          a string is formatted to translate the conflict reason codes into self explanatory descriptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Conflict

public Conflict(SchedCourse sched1,
                SchedCourse sched2,
                int reason)
Parameters:
sched1 - the schedule1
sched2 - the schedule2
reason -
Method Detail

getReason

public int getReason()
Gets the Reason

Returns:
an integer specifying the conflict reason code

getSched1

public SchedCourse getSched1()
Gets Schedule 1

Returns:
an Sched specifying the schedule 1

getSched2

public SchedCourse getSched2()
Gets Schedule 2

Returns:
an Sched specifying the schedule 2

toString

public java.lang.String toString()
a string is formatted to translate the conflict reason codes into self explanatory descriptions

Overrides:
toString in class java.lang.Object