LogicalImpl Class

DEPRECATED Use com.bea.p13n.expression.Expression instead.

com.beasys.commerce.foundation.expression
LogicalImpl Class

public class LogicalImpl

    extends com.beasys.commerce.foundation.expression.ExpressionImpl
    implements Cloneable, com.beasys.commerce.foundation.expression.Logical

An expression which does a boolean AND or OR against a list of child expression.

Related Topics

Logical
LogicalHome
ExpressionHelper


Hierarchy
Object
  com.beasys.commerce.foundation.expression.ExpressionImpl
    LogicalImpl
All Implemented Interfaces

Cloneable, Comparable, com.beasys.commerce.foundation.expression.Expression, com.beasys.commerce.foundation.expression.Logical, Serializable

Field Summary

public Collection
children
The list of children Expressions.
public String
logical
The boolean logical operator.
   
Fields from  com.beasys.commerce.foundation.expression.com.beasys.commerce.foundation.expression.ExpressionImpl
not
 

Constructor Summary

LogicalImpl()

Constructor.
 

Method Summary

public boolean
addAllChildren(Collection collection)
Adds all of the expressions in the specified collection to our list of children expressions.
public boolean
addChildren(Expression element)
Ensures that the list of children expressions contains the specified expression.
public void
clearChildren()
Removes all children expressions.
public int
compareTo(Object o)
Compare this belonging to another
public boolean
containsAllChildren(Collection collection)
Returns true if all the specified expressions are our children.
public boolean
containsChildren(Expression element)
Returns true if the specified expression is one of our children.
public boolean
equalsChildren(Object object)
Compares the specified object with the list of children expressions.
public Collection
getAllChildren()
Returns the list of children expressions.
public String
getLogical()
Get the boolean logical operator.
public int
hashCodeChildren()
Returns the hash code value for the list of children expressions.
public String
interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model.
public boolean
isEmptyChildren()
Returns true if we have no children.
public Iterator
iteratorChildren()
Returns an iterator over the list of children expressions.
public boolean
removeAllChildren(Collection collection)
Removes, from our children, all of the expressions specified.
public boolean
removeChildren(Expression element)
Removes a single child expression from us.
public boolean
retainAllChildren(Collection collection)
Retains only the children which are also contained in the specified collection.
public void
setAllChildren(Collection collection)
Sets the list of children expressions.
public void
setByValue(Object value)
It is possible to call set-by-value with a superclass.
public void
setLogical(String logical)
Set the boolean logical operator.
public int
sizeChildren()
Returns the number of children expressions.
public Object
value()
value() is a more typesafe implementation of clone()
public void
valueOf(String expression)
Populate this Logical from the given expression string.
 
Methods from  com.beasys.commerce.foundation.expression.com.beasys.commerce.foundation.expression.ExpressionImpl
clone, equals, getNot, setNot, toString,
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface java.lang.Comparable
compareTo
 
Methods from interface com.beasys.commerce.foundation.expression.com.beasys.commerce.foundation.expression.Expression
getNot, interfaceName, setByValue, setNot, toString, value, valueOf
 
Methods from interface com.beasys.commerce.foundation.expression.com.beasys.commerce.foundation.expression.Logical
addAllChildren, addChildren, clearChildren, containsAllChildren, containsChildren, equalsChildren, getAllChildren, getLogical, hashCodeChildren, isEmptyChildren, iteratorChildren, removeAllChildren, removeChildren, retainAllChildren, setAllChildren, setLogical, sizeChildren
 

Field Detail

children

public Collection children
The list of children Expressions.


logical

public String logical
The boolean logical operator.

 

Constructor Detail

LogicalImpl

public LogicalImpl()
Constructor.
 

Method Detail

addAllChildren(Collection) Method

public boolean addAllChildren(Collection collection)
Adds all of the expressions in the specified collection to our list of children expressions.


addChildren(Expression) Method

public boolean addChildren(Expression element)
Ensures that the list of children expressions contains the specified expression.


clearChildren() Method

public void clearChildren()
Removes all children expressions.


compareTo(Object) Method

public int compareTo(Object o)
Compare this belonging to another

Overrides
ExpressionImpl.compareTo(Object)

Parameters

o
target object for comparision

Returns

0 objects are equal

containsAllChildren(Collection) Method

public boolean containsAllChildren(Collection collection)
Returns true if all the specified expressions are our children.


containsChildren(Expression) Method

public boolean containsChildren(Expression element)
Returns true if the specified expression is one of our children.


equalsChildren(Object) Method

public boolean equalsChildren(Object object)
Compares the specified object with the list of children expressions.


getAllChildren() Method

public Collection getAllChildren()
Returns the list of children expressions.


getLogical() Method

public String getLogical()
Get the boolean logical operator.


hashCodeChildren() Method

public int hashCodeChildren()
Returns the hash code value for the list of children expressions.


interfaceName() Method

public String interfaceName()
interfaceName() returns the unqualified name of the interface from the UML model.

Overrides
ExpressionImpl.interfaceName()

Returns

the unqualified name of the belonging interface

isEmptyChildren() Method

public boolean isEmptyChildren()
Returns true if we have no children.


iteratorChildren() Method

public Iterator iteratorChildren()
Returns an iterator over the list of children expressions.


removeAllChildren(Collection) Method

public boolean removeAllChildren(Collection collection)
Removes, from our children, all of the expressions specified.


removeChildren(Expression) Method

public boolean removeChildren(Expression element)
Removes a single child expression from us.


retainAllChildren(Collection) Method

public boolean retainAllChildren(Collection collection)
Retains only the children which are also contained in the specified collection.


setAllChildren(Collection) Method

public void setAllChildren(Collection collection)
Sets the list of children expressions.


setByValue(Object) Method

public void setByValue(Object value)
It is possible to call set-by-value with a superclass.

If that is the case, only the fields in the superclass will be set in this instance. The remaining fields get the default values. It is also possible to call set-by-value with a subclass. In this case, the specialized fields in the subclass will be ignored. The overridden fields in the subclass will be populated.

Overrides
ExpressionImpl.setByValue(Object)

setLogical(String) Method

public void setLogical(String logical)
Set the boolean logical operator.


sizeChildren() Method

public int sizeChildren()
Returns the number of children expressions.


value() Method

public Object value()
value() is a more typesafe implementation of clone()

Overrides
ExpressionImpl.value()

Returns

a clone of this instance

valueOf(String) Method

public void valueOf(String expression)
throws IllegalArgumentException
Populate this Logical from the given expression string.

Overrides
ExpressionImpl.valueOf(String)

Exceptions

IllegalArgumentException
thrown on an invalid expression string.

Related Topics

ExpressionHelper.parse(String)