|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.exam.model.ExamRoomPlacement
public class ExamRoomPlacement
Representation of a room placement of an exam. It contains a room ExamRoom
and a penalty
associated with a placement of an exam into the given room.
Constructor Summary | |
---|---|
ExamRoomPlacement(ExamRoom room)
Constructor |
|
ExamRoomPlacement(ExamRoom room,
int penalty)
Constructor |
|
ExamRoomPlacement(ExamRoom room,
int penalty,
int maxPenalty)
Constructor |
Method Summary | |
---|---|
int |
compareTo(Object o)
Compare two room placements |
boolean |
equals(Object o)
Compare two room placements for equality |
int |
getDistance(ExamRoomPlacement other)
Room distance |
long |
getId()
Examination room id |
int |
getMaxPenalty()
Maximal penalty imposed of ExamRoom.getPenalty(ExamPeriod) , i.e., a placement with greater penalty is not allowed to be made |
String |
getName()
Examination room name |
int |
getPenalty()
Penalty for assignment of an exam into this room Exam.getRoomPlacements() |
int |
getPenalty(ExamPeriod period)
Penalty for assignment of an exam into this room Exam.getRoomPlacements() and the given examination period |
ExamRoom |
getRoom()
Examination room |
int |
getSize(boolean altSeating)
Room size |
int |
hashCode()
Hash code |
boolean |
isAvailable(ExamPeriod period)
Examination room availability |
void |
setMaxPenalty(int maxPenalty)
Maximal penalty imposed of ExamRoom.getPenalty(ExamPeriod) , i.e., a placement with greater penalty is not allowed to be made |
void |
setPenalty(int penalty)
Penalty for assignment of an exam into this room Exam.getRoomPlacements() |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExamRoomPlacement(ExamRoom room)
room
- examination roompublic ExamRoomPlacement(ExamRoom room, int penalty)
room
- examination roompenalty
- penalty for using this roompublic ExamRoomPlacement(ExamRoom room, int penalty, int maxPenalty)
room
- examination roompenalty
- penalty for using this roommaxPenalty
- maximal penalty imposed of ExamRoom.getPenalty(ExamPeriod)
, i.e., a placement with greater penalty is not allowed to be madeMethod Detail |
---|
public ExamRoom getRoom()
public long getId()
public String getName()
public boolean isAvailable(ExamPeriod period)
public int getPenalty()
Exam.getRoomPlacements()
public int getMaxPenalty()
ExamRoom.getPenalty(ExamPeriod)
, i.e., a placement with greater penalty is not allowed to be made
public void setPenalty(int penalty)
Exam.getRoomPlacements()
public void setMaxPenalty(int maxPenalty)
ExamRoom.getPenalty(ExamPeriod)
, i.e., a placement with greater penalty is not allowed to be made
public int getPenalty(ExamPeriod period)
Exam.getRoomPlacements()
and the given examination period
getPenalty()
+ ExamRoom.getPenalty(ExamPeriod)
public int getSize(boolean altSeating)
altSeating
- examination seeting (pass Exam.hasAltSeating()
)
public int getDistance(ExamRoomPlacement other)
ExamRoom.getDistance(ExamRoom)
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |