org.optaplanner.examples.tennis.domain
Class TennisSolution
java.lang.Object
org.optaplanner.examples.common.domain.AbstractPersistable
org.optaplanner.examples.tennis.domain.TennisSolution
- All Implemented Interfaces:
- Serializable, Comparable<AbstractPersistable>, Solution<HardMediumSoftScore>
public class TennisSolution
- extends AbstractPersistable
- implements Solution<HardMediumSoftScore>
- See Also:
- Serialized Form
TennisSolution
public TennisSolution()
getTeamList
public List<Team> getTeamList()
setTeamList
public void setTeamList(List<Team> teamList)
getDayList
public List<Day> getDayList()
setDayList
public void setDayList(List<Day> dayList)
getUnavailabilityPenaltyList
public List<UnavailabilityPenalty> getUnavailabilityPenaltyList()
setUnavailabilityPenaltyList
public void setUnavailabilityPenaltyList(List<UnavailabilityPenalty> unavailabilityPenaltyList)
getTeamAssignmentList
public List<TeamAssignment> getTeamAssignmentList()
setTeamAssignmentList
public void setTeamAssignmentList(List<TeamAssignment> teamAssignmentList)
getScore
public HardMediumSoftScore getScore()
- Description copied from interface:
Solution
- Returns the Score of this Solution.
- Specified by:
getScore
in interface Solution<HardMediumSoftScore>
- Returns:
- null if the Solution is uninitialized
or the last calculated Score is dirty the new Score has not yet been recalculated
setScore
public void setScore(HardMediumSoftScore score)
- Description copied from interface:
Solution
- Called by the
Solver
when the Score of this Solution has been calculated.
- Specified by:
setScore
in interface Solution<HardMediumSoftScore>
- Parameters:
score
- null if the Solution has changed and the new Score has not yet been recalculated
getProblemFacts
public Collection<?> getProblemFacts()
- Description copied from interface:
Solution
- Called by the
DroolsScoreDirector
when the Solution
needs to be inserted
into an empty KieSession
.
These facts can be used by the score rules.
They don't change during planning (except through ProblemFactChange
events).
Do not include the planning entities as problem facts:
they are automatically inserted into the KieSession
if and only if they are initialized.
When they are initialized later, they are also automatically inserted.
- Specified by:
getProblemFacts
in interface Solution<HardMediumSoftScore>
- Returns:
- never null (although an empty collection is allowed),
all the facts of this solution except for the planning entities
Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.