Class ConditionInfo

java.lang.Object
org.bzdev.drama.common.ConditionInfo

public class ConditionInfo extends Object
Auxiliary data about a condition change. Several classes (actors in particular) contain two methods named onConditionChange(Condition, ConditionMode, SimObject) and onConditionChange(Map<Condition,ConditionInfo>). The default implementation of the latter calls the former method, obtaining the former method's second and third arguments from an instance of ConditionInfo.
  • Constructor Details

    • ConditionInfo

      public ConditionInfo(ConditionMode mode, SimObject source)
      Constructor.
      Parameters:
      mode - the mode for a condition change
      source - the source for a condition change
  • Method Details

    • getMode

      public ConditionMode getMode()
      Get the condition mode for the change.
      Returns:
      the condition mode
    • getSource

      public SimObject getSource()
      Get the source of a change.
      Returns:
      the source