|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.ConditionalVariable
public class ConditionalVariable
ConditionalVariable.java The variable used in the antecedent (the 'if' part) of the Conditional. proposition. The states of ConditionalVariables and logic expression of the antecedent determine the state of the Conditional.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary | |
|---|---|
static int |
EQUAL
|
static int |
GREATER_THAN
|
static int |
GREATER_THAN_OR_EQUAL
|
static int |
LESS_THAN
|
static int |
LESS_THAN_OR_EQUAL
|
static int |
NUM_COMPARE_OPERATIONS
|
| Constructor Summary | |
|---|---|
ConditionalVariable()
|
|
ConditionalVariable(boolean not,
int opern,
int type,
String name,
boolean trigger)
|
|
| Method Summary | |
|---|---|
boolean |
doTriggerActions()
If change of state of this object causes a change of state of the Conditional, should any actions be executed. |
boolean |
evaluate()
Evaluates this State Variable Returns true if variable evaluates true, otherwise false. |
static String |
getCompareOperationString(int index)
|
static String |
getCompareSymbols(int index)
|
String |
getDataString()
|
static String |
getItemTypeString(int t)
Convert Variable Type to Text String |
String |
getName()
|
int |
getNum1()
|
int |
getNum2()
|
int |
getOpern()
|
String |
getOpernString()
|
int |
getState()
|
static String |
getStateString(int t)
get state name from Variable Test Type |
String |
getTestTypeString()
|
static String |
getTestTypeString(int t)
Convert Variable Test Type to Text String |
int |
getType()
|
boolean |
isNegated()
|
void |
setDataString(String data)
|
void |
setName(String name)
|
void |
setNegation(boolean not)
|
void |
setNum1(int num)
|
void |
setNum2(int num)
|
void |
setOpern(int opern)
|
void |
setState(boolean state)
|
void |
setState(int state)
|
void |
setTriggerActions(boolean trigger)
|
void |
setType(int type)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NUM_COMPARE_OPERATIONS
public static final int LESS_THAN
public static final int LESS_THAN_OR_EQUAL
public static final int EQUAL
public static final int GREATER_THAN_OR_EQUAL
public static final int GREATER_THAN
| Constructor Detail |
|---|
public ConditionalVariable()
public ConditionalVariable(boolean not,
int opern,
int type,
String name,
boolean trigger)
| Method Detail |
|---|
public boolean isNegated()
public void setNegation(boolean not)
public int getOpern()
public void setOpern(int opern)
public int getType()
public void setType(int type)
public String getName()
public void setName(String name)
public String getDataString()
public void setDataString(String data)
public int getNum1()
public void setNum1(int num)
public int getNum2()
public void setNum2(int num)
public boolean doTriggerActions()
public void setTriggerActions(boolean trigger)
public int getState()
public void setState(int state)
public void setState(boolean state)
public String getTestTypeString()
public String getOpernString()
public boolean evaluate()
Returns true if variable evaluates true, otherwise false.
public static String getItemTypeString(int t)
public static String getStateString(int t)
public static String getTestTypeString(int t)
public static String getCompareOperationString(int index)
public static String getCompareSymbols(int index)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||