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

## org.drools.planner.core.heuristic.selector.move.factory
Interface MoveIteratorFactory

    public interface MoveIteratorFactory

An interface to generate an `Iterator` of custom `Move`s.

For a more simple version, see `MoveListFactory`.

Method Summary
`Iterator<Move>` | `createOriginalMoveIterator(ScoreDirector scoreDirector)` When it is called depends on the configured `SelectionCacheType`.
`Iterator<Move>` | `createRandomMoveIterator(ScoreDirector scoreDirector, Random workingRandom)` When it is called depends on the configured `SelectionCacheType`.
`long` | `getSize(ScoreDirector scoreDirector)`

Method Detail

### getSize

    long getSize(ScoreDirector scoreDirector)

  Parameters:
    `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` of which the `Move`s need to be generated
  Returns:
    the approximate number of elements generated by `createOriginalMoveIterator(ScoreDirector)`

### createOriginalMoveIterator

    Iterator<Move> createOriginalMoveIterator(ScoreDirector scoreDirector)

  When it is called depends on the configured `SelectionCacheType`.

  Parameters:
    `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` of which the `Move`s need to be generated
  Returns:
    never null, an `Iterator` that will end sooner or later

### createRandomMoveIterator

    Iterator<Move> createRandomMoveIterator(ScoreDirector scoreDirector,
                                            Random workingRandom)

  When it is called depends on the configured `SelectionCacheType`.

  Parameters:
    `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` of which the `Move`s need to be generated
    `workingRandom` - never null, the `Random` to use when any random number is needed, so `EnvironmentMode.REPRODUCIBLE` works correctly
  Returns:
    never null, an `Iterator` that is allowed (or even presumed) to be never ending

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

Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.