Class ConditionList
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.snap.data.Condition
-
- com.inductiveautomation.snap.data.ConditionList
-
- All Implemented Interfaces:
Archivable,RMJSONArchiver.GetKeys,RMPropertyChanger,java.beans.PropertyChangeListener,java.lang.Cloneable,java.util.EventListener
public class ConditionList extends Condition implements java.beans.PropertyChangeListener
This condition subclass represents a list of conditions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.snap.data.Condition
Condition.DateConstraint, Condition.Operator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCondition_Propstatic java.lang.StringOperator_Prop-
Fields inherited from class com.inductiveautomation.snap.data.Condition
DateConstraint_Prop, IgnoreCase_Prop, Negated_Prop, PropertyName_Prop, Value_Prop
-
-
Constructor Summary
Constructors Constructor Description ConditionList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConditionListaddCondition(Condition.Operator anOperator, Condition aCondition)Adds a condition.ConditionListaddCondition(Condition.Operator anOperator, Condition aCondition, int anIndex)Adds a condition at given index.ConditionListaddCondition(Condition.Operator anOperator, java.lang.String aPropertyName, Condition.Operator anOperator2, java.lang.Object aValue)Adds a condition for givenConditionListaddCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)Adds a condition for givenConditionListclone()Standard clone implementation.booleanequals(java.lang.Object anObj)Standard equals implementation.ConditionListfromXML(RXArchiver anArchiver, RXElement anElement)XML Unarchival.ConditiongetCondition(int anIndex)Returns the condition at the given index.intgetConditionCount()Returns the number of conditions in this composite.java.util.List<Condition>getConditions()Returns the conditions.java.util.List<java.lang.String>getJSONKeys()RMJSONArchiver.GetKeys method.Condition.OperatorgetOperator(int anIndex)Returns the operator at the given index.java.util.List<Condition.Operator>getOperators()Returns the operators.booleangetValue(Entity anEntity, java.lang.Object anObj)Override to handle list.intindexOfCondition(Condition aCondition)Returns the index of a given condition.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)Catches child property changes and forwards them to our listener.ConditionremoveCondition(int anIndex)Removes a condition from a given index.intremoveCondition(Condition aCondition)Removes the given condition.voidsetConditions(java.util.List<Condition> theConditions)Sets the conditions.voidsetOperator(Condition.Operator anOperator, int anIndex)Sets the operator at the given index.java.lang.StringtoString()Returns a string for condition.RXElementtoXML(RXArchiver anArchiver)XML Archival.-
Methods inherited from class com.inductiveautomation.snap.data.Condition
getDateConstraint, getDateConstraintDefault, getDateConstraintMultiplier, getIgnoreCase, getOperator, getOperators, getPropertyName, getValue, isNegated, setDateConstraint, setIgnoreCase, setNegated, setOperator, setPropertyName, setValue
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Field Detail
-
Condition_Prop
public static final java.lang.String Condition_Prop
- See Also:
- Constant Field Values
-
Operator_Prop
public static final java.lang.String Operator_Prop
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOperators
public java.util.List<Condition.Operator> getOperators()
Returns the operators.
-
getConditions
public java.util.List<Condition> getConditions()
Returns the conditions.
-
setConditions
public void setConditions(java.util.List<Condition> theConditions)
Sets the conditions.
-
getConditionCount
public int getConditionCount()
Returns the number of conditions in this composite.
-
getCondition
public Condition getCondition(int anIndex)
Returns the condition at the given index.
-
addCondition
public ConditionList addCondition(Condition.Operator anOperator, Condition aCondition)
Adds a condition.
-
addCondition
public ConditionList addCondition(Condition.Operator anOperator, Condition aCondition, int anIndex)
Adds a condition at given index.
-
addCondition
public ConditionList addCondition(java.lang.String aPropertyName, Condition.Operator anOperator, java.lang.Object aValue)
Adds a condition for given
-
addCondition
public ConditionList addCondition(Condition.Operator anOperator, java.lang.String aPropertyName, Condition.Operator anOperator2, java.lang.Object aValue)
Adds a condition for given
-
removeCondition
public Condition removeCondition(int anIndex)
Removes a condition from a given index.
-
removeCondition
public int removeCondition(Condition aCondition)
Removes the given condition.
-
indexOfCondition
public int indexOfCondition(Condition aCondition)
Returns the index of a given condition.
-
getOperator
public Condition.Operator getOperator(int anIndex)
Returns the operator at the given index.
-
setOperator
public void setOperator(Condition.Operator anOperator, int anIndex)
Sets the operator at the given index.
-
getValue
public boolean getValue(Entity anEntity, java.lang.Object anObj)
Override to handle list.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Catches child property changes and forwards them to our listener.- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.
-
clone
public ConditionList clone()
Standard clone implementation.
-
getJSONKeys
public java.util.List<java.lang.String> getJSONKeys()
RMJSONArchiver.GetKeys method.- Specified by:
getJSONKeysin interfaceRMJSONArchiver.GetKeys- Overrides:
getJSONKeysin classCondition
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.- Specified by:
toXMLin interfaceArchivable- Overrides:
toXMLin classCondition
-
fromXML
public ConditionList fromXML(RXArchiver anArchiver, RXElement anElement)
XML Unarchival.- Specified by:
fromXMLin interfaceArchivable- Overrides:
fromXMLin classCondition
-
-