001package jmri.jmrit.symbolicprog;
002
003/**
004 * Qualify a variable on greater than or equal a number
005 *
006 * @author Bob Jacobsen Copyright (C) 2010, 2014
007 *
008 */
009public class ValueQualifier extends ArithmeticQualifier {
010
011    public ValueQualifier(VariableValue qualifiedVal, VariableValue watchedVal, int value, String relation) {
012        super(watchedVal, value, relation);
013
014        this.qualifiedVal = qualifiedVal;
015        setWatchedAvailable(currentDesiredState());
016    }
017
018    VariableValue qualifiedVal;
019
020    @Override
021    public void setWatchedAvailable(boolean enable) {
022        qualifiedVal.setAvailable(enable);
023    }
024
025    @Override
026    protected boolean currentAvailableState() {
027        return qualifiedVal.getAvailable();
028    }
029
030}