org.optaplanner.core.impl.domain.lookup

## Class LookUpManager

- java.lang.Object
- - org.optaplanner.core.impl.domain.lookup.LookUpManager

-     public class LookUpManager
      extends Object

  See Also:
    `PlanningId`, `ScoreDirector.lookUpWorkingObject(Object)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LookUpManager(LookUpStrategyResolver lookUpStrategyResolver)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addWorkingObject(Object workingObject)`
    `void` | `clearWorkingObjects()`
    `<E> E` | `lookUpWorkingObject(E externalObject)` As defined by `ScoreDirector.lookUpWorkingObject(Object)`.
    `<E> E` | `lookUpWorkingObjectOrReturnNull(E externalObject)` As defined by `ScoreDirector.lookUpWorkingObjectOrReturnNull(Object)`.
    `void` | `removeWorkingObject(Object workingObject)`
    `void` | `resetWorkingObjects(Collection<Object> allFacts)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LookUpManager

          public LookUpManager(LookUpStrategyResolver lookUpStrategyResolver)

  - ### Method Detail

    - #### resetWorkingObjects

          public void resetWorkingObjects(Collection<Object> allFacts)

    - #### addWorkingObject

          public void addWorkingObject(Object workingObject)

    - #### removeWorkingObject

          public void removeWorkingObject(Object workingObject)

    - #### clearWorkingObjects

          public void clearWorkingObjects()

    - #### lookUpWorkingObject

          public <E> E lookUpWorkingObject(E externalObject)

      As defined by `ScoreDirector.lookUpWorkingObject(Object)`.
      Type Parameters:
        `E` - the object type
      Parameters:
        `externalObject` - sometimes null
      Returns:
        null if externalObject is null
      Throws:
        `IllegalArgumentException` - if there is no workingObject for externalObject, if it cannot be looked up or if the externalObject's class is not supported
        `IllegalStateException` - if it cannot be looked up

    - #### lookUpWorkingObjectOrReturnNull

          public <E> E lookUpWorkingObjectOrReturnNull(E externalObject)

      As defined by `ScoreDirector.lookUpWorkingObjectOrReturnNull(Object)`.
      Type Parameters:
        `E` - the object type
      Parameters:
        `externalObject` - sometimes null
      Returns:
        null if externalObject is null or if there is no workingObject for externalObject
      Throws:
        `IllegalArgumentException` - if it cannot be looked up or if the externalObject's class is not supported
        `IllegalStateException` - if it cannot be looked up

Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.