Class SetVariablesFilter

  • All Implemented Interfaces:
    IVariableFilter

    public class SetVariablesFilter
    extends java.lang.Object
    implements IVariableFilter
    Enables only variables in the given map.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • SetVariablesFilter

        public SetVariablesFilter​(java.util.Set<IDecisionVariable> enabled)
        Creates a variables filter from the given set.
        Parameters:
        enabled - the enabled variables
    • Method Detail

      • createFilter

        public static SetVariablesFilter createFilter​(java.util.Set<AbstractIvmlVariable> enabled)
        Creates a variables filter from the given set.
        Parameters:
        enabled - the enabled variables
        Returns:
        the filter instance
      • isEnabled

        public boolean isEnabled​(IDecisionVariable variable)
        Description copied from interface: IVariableFilter
        Checks the given variable.
        Specified by:
        isEnabled in interface IVariableFilter
        Parameters:
        variable - the variable to be checked
        Returns:
        true if the variable is in (enabled), false if it is out