Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.1.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.examples.nqueens.domain
Class NQueens

    java.lang.Object
      org.optaplanner.examples.common.domain.AbstractPersistable
          org.optaplanner.examples.nqueens.domain.NQueens

All Implemented Interfaces:
  Serializable, Comparable<AbstractPersistable>, Solution<SimpleScore>

    public class NQueens

extends AbstractPersistable
implements Solution<SimpleScore>

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
`id`

Constructor Summary
`NQueens()`

Method Summary
`List<Column>` | `getColumnList()`
`int` | `getN()`
`Collection<? extends Object>` | `getProblemFacts()` Called by the `DroolsScoreDirector` when the `Solution` needs to be inserted into an empty `KieSession`.
`List<Queen>` | `getQueenList()`
`List<Row>` | `getRowList()`
`SimpleScore` | `getScore()` Returns the `Score` of this Solution.
`void` | `setColumnList(List<Column> columnList)`
`void` | `setN(int n)`
`void` | `setQueenList(List<Queen> queenList)`
`void` | `setRowList(List<Row> rowList)`
`void` | `setScore(SimpleScore score)` Called by the `Solver` when the `Score` of this Solution has been calculated.

Methods inherited from class org.optaplanner.examples.common.domain.AbstractPersistable
`compareTo, 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

### getN

    public int getN()

### setN

    public void setN(int n)

### getColumnList

    public List<Column> getColumnList()

### setColumnList

    public void setColumnList(List<Column> columnList)

### getRowList

    public List<Row> getRowList()

### setRowList

    public void setRowList(List<Row> rowList)

### getQueenList

    public List<Queen> getQueenList()

### setQueenList

    public void setQueenList(List<Queen> queenList)

### getScore

    public SimpleScore getScore()

  Description copied from interface: `Solution`
  Returns the `Score` of this Solution.

  Specified by:
    `getScore` in interface `Solution<SimpleScore>`
  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(SimpleScore 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<SimpleScore>`
  Parameters:
    `score` - null if the Solution has changed and the new `Score` has not yet been recalculated

### getProblemFacts

    public Collection<? extends Object> 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<SimpleScore>`
  Returns:
    never null (although an empty collection is allowed), all the facts of this solution except for the planning entities

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.1.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.