|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscheduler.modules.SchedulerCRNManager
A class used to keep eye on user's history of travels (both accepted and rejected cases are stored). It also performs the finding out of similar cases from the past to the given one. It uses the CRN to achieve that all.
Field Summary | |
private CRN |
crn
A CRN used to store the history. |
private java.lang.String |
historyFileName
A name of the history file. |
Constructor Summary | |
SchedulerCRNManager(java.lang.String historyFileName)
Constructor. |
Method Summary | |
void |
AddTravelSolution(ConnectionsFinderTask travelSolution,
boolean fAccepted)
Add the given travel solution to the history. |
private Case |
GetCase(ConnectionsFinderTask travelSolution,
boolean fAccepted)
Converts the travel solution to the CRN case. |
CRN |
GetCRN()
Gets the CRN used by this CRN manager. |
double |
JudgeTravelSolution(ConnectionsFinderTask travelSolution)
Judges the given travel solution. |
void |
SaveToFile()
Saves the current history state to the file it has been loaded from. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String historyFileName
private CRN crn
Constructor Detail |
public SchedulerCRNManager(java.lang.String historyFileName)
historyFileName
- A name of the file with the history to be loaded now and saved on exit.Method Detail |
public CRN GetCRN()
public void SaveToFile()
public double JudgeTravelSolution(ConnectionsFinderTask travelSolution)
TravelSolutionsJudger
JudgeTravelSolution
in interface TravelSolutionsJudger
travelSolution
- A travel solution to be judged.
TravelSolutionsJudger.JudgeTravelSolution(ConnectionsFinderTask)
public void AddTravelSolution(ConnectionsFinderTask travelSolution, boolean fAccepted)
TravelSolutionsJudger
AddTravelSolution
in interface TravelSolutionsJudger
travelSolution
- A travel solution to be added.fAccepted
- Indicates whether this case has been accepted ot rejected by the user.TravelSolutionsJudger.AddTravelSolution(ConnectionsFinderTask, boolean)
private Case GetCase(ConnectionsFinderTask travelSolution, boolean fAccepted)
travelSolution
- A travel solution to be converted.fAccepted
- Indicates whether the returned case must be the accepted or rejected.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |