Interface RefreshableMove<M extends Move<S,I>, S extends Solution<S,I>, I extends Instance>

Type Parameters:
M - refreshed move type
S - solution type
I - instance type

public interface RefreshableMove<M extends Move<S,I>, S extends Solution<S,I>, I extends Instance>
Move that can rebuild itself for the current solution state.

Refreshing must return a new move instance bound to the given solution, or an empty optional if the old move is no longer valid for the current solution.

  • Method Summary

    Modifier and Type
    Method
    Description
    refresh(S solution)
    Rebuild this move for the given solution state.
  • Method Details

    • refresh

      Optional<M> refresh(S solution)
      Rebuild this move for the given solution state.
      Parameters:
      solution - current solution
      Returns:
      refreshed move, or empty if the move is no longer valid