Class DictionaryCondition

Object
AnchorBean<DictionaryCondition>
InitializableBean<DictionaryCondition, ImageInitialization>
ImageBean<DictionaryCondition>
DictionaryCondition

public class DictionaryCondition extends ImageBean<DictionaryCondition>
Checks if a value in a Dictionary is equal to an expected value.
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    DictionaryProvider
    The dictionary to provide a value to check.
    The key in the dictionary whose value is checked.
    The value the key should have in the dictionary, in order for the condition to be fulfilled.
    boolean
    Checks if the condition is true by comparing the value in the dictionary with the expected value.
    void
    setDictionary(DictionaryProvider dictionary)
    The dictionary to provide a value to check.
    void
    The key in the dictionary whose value is checked.
    void
    The value the key should have in the dictionary, in order for the condition to be fulfilled.

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DictionaryCondition

      public DictionaryCondition()
  • Method Details

    • isConditionTrue

      public boolean isConditionTrue() throws ProvisionFailedException
      Checks if the condition is true by comparing the value in the dictionary with the expected value.
      Returns:
      true if the value in the dictionary matches the expected value, false otherwise.
      Throws:
      ProvisionFailedException - if the dictionary cannot be created or the key doesn't exist in the dictionary.
    • getDictionary

      public DictionaryProvider getDictionary()
      The dictionary to provide a value to check.
    • setDictionary

      public void setDictionary(DictionaryProvider dictionary)
      The dictionary to provide a value to check.
    • getKey

      public String getKey()
      The key in the dictionary whose value is checked.
    • setKey

      public void setKey(String key)
      The key in the dictionary whose value is checked.
    • getValue

      public String getValue()
      The value the key should have in the dictionary, in order for the condition to be fulfilled.
    • setValue

      public void setValue(String value)
      The value the key should have in the dictionary, in order for the condition to be fulfilled.