resources
Class CRTime

java.lang.Object
  extended by resources.CRTime
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class CRTime
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Maintains and manipulates Time for the Classroom Scheduler. Stores only hours minutes and the AM flag. Used by TimeSlot class. Assumes that 7 AM is 0, and 10PM is 900. There are 900 schedulable minutes in the day.

See Also:
Serialized Form

Constructor Summary
CRTime(int crMinutes)
          Constructor declaration
CRTime(int hours, int minutes, boolean am)
          Constructor declaration
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 boolean getam()
           
 int getcrMinutes()
           
 int getHours()
           
 int getMinutes()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CRTime

public CRTime(int crMinutes)
       throws CRTimeException
Constructor declaration

Parameters:
crMinutes -
Throws:
CRTimeException

CRTime

public CRTime(int hours,
              int minutes,
              boolean am)
       throws CRTimeException
Constructor declaration

Parameters:
int - hours
int - minutes
boolean - am
Throws:
CRTimeException
Method Detail

getcrMinutes

public int getcrMinutes()

getHours

public int getHours()

getMinutes

public int getMinutes()

getam

public boolean getam()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object