org.drools.planner.examples.nqueens.domain
Class NQueens

java.lang.Object
  extended by org.drools.planner.examples.common.domain.AbstractPersistable
      extended by org.drools.planner.examples.nqueens.domain.NQueens
All Implemented Interfaces:
Serializable, Solution<SimpleScore>

public class NQueens
extends AbstractPersistable
implements Solution<SimpleScore>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.drools.planner.examples.common.domain.AbstractPersistable
id
 
Constructor Summary
NQueens()
           
 
Method Summary
 NQueens cloneSolution()
          Clone will only deep copy the queenList.
 List<Integer> createNList()
           
 Collection<? extends Object> getFacts()
           
 int getN()
           
 List<Queen> getQueenList()
           
 SimpleScore getScore()
           
 void setQueenList(List<Queen> queenList)
           
 void setScore(SimpleScore score)
           
 
Methods inherited from class org.drools.planner.examples.common.domain.AbstractPersistable
getId, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NQueens

public NQueens()
Method Detail

getQueenList

public List<Queen> getQueenList()

setQueenList

public void setQueenList(List<Queen> queenList)

getScore

public SimpleScore getScore()
Specified by:
getScore in interface Solution<SimpleScore>

setScore

public void setScore(SimpleScore score)
Specified by:
setScore in interface Solution<SimpleScore>

getN

public int getN()

createNList

public List<Integer> createNList()
Returns:
a list of every possible n

getFacts

public Collection<? extends Object> getFacts()
Specified by:
getFacts in interface Solution<SimpleScore>

cloneSolution

public NQueens cloneSolution()
Clone will only deep copy the queenList.

Specified by:
cloneSolution in interface Solution<SimpleScore>


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.