Class Logic.AtLeast

java.lang.Object
org.mitre.synthea.engine.Logic
org.mitre.synthea.engine.Logic.AtLeast
All Implemented Interfaces:
Serializable
Enclosing class:
Logic

public static class Logic.AtLeast extends Logic
The At Least condition type tests that a minimum number of conditions from a set of sub-conditions are true. If the minimum number or more sub-conditions are true, it will return true, but if less than the minimum are true, it will return false. (If the minimum is the same as the number of sub-conditions provided, this is equivalent to the And condition. If the minimum is 1, this is equivalent to the Or condition.)
See Also:
  • Field Details

    • conditions

      protected Collection<Logic> conditions
      A collection of conditions associated with the logic.
  • Constructor Details

    • AtLeast

      public AtLeast()
  • Method Details

    • test

      public boolean test(Person person, long time)
      Description copied from class: Logic
      Test whether the logic is true for the given person at the given time.
      Specified by:
      test in class Logic
      Parameters:
      person - Person to execute logic against
      time - Timestamp to execute logic against
      Returns:
      boolean - whether or not the given condition is true or not