Class 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.
    • Constructor Detail

      • ConditionList

        public ConditionList()
    • 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​(java.lang.String aPropertyName,
                                          Condition.Operator anOperator,
                                          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.
        Overrides:
        getValue in class Condition
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent anEvent)
        Catches child property changes and forwards them to our listener.
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • equals

        public boolean equals​(java.lang.Object anObj)
        Standard equals implementation.
        Overrides:
        equals in class Condition
      • toString

        public java.lang.String toString()
        Returns a string for condition.
        Overrides:
        toString in class Condition