org.deri.wsmo4j.logicalexpression
Class BinaryImpl

java.lang.Object
  extended by org.deri.wsmo4j.logicalexpression.LogicalExpressionImpl
      extended by org.deri.wsmo4j.logicalexpression.BinaryImpl
All Implemented Interfaces:
org.omwg.logicalexpression.Binary, org.omwg.logicalexpression.CompoundExpression, org.omwg.logicalexpression.LogicalExpression
Direct Known Subclasses:
ConjunctionImpl, DisjunctionImpl, EquationImpl, ImplicationImpl, InverseImplicationImpl, LogicProgrammingRuleImpl

public abstract class BinaryImpl
extends LogicalExpressionImpl
implements org.omwg.logicalexpression.Binary

This class reunites all binary logical expressions (e.g LogExpr1 op LogExpr2)

Version:
$Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
Author:
DERI Innsbruck, reto.krummenacher@deri.org, DERI Innsbruck, thomas.haselwanter@deri.org
See Also:
Binary

Field Summary
protected  org.omwg.logicalexpression.LogicalExpression exprLeft
           
protected  org.omwg.logicalexpression.LogicalExpression exprRight
           
 
Constructor Summary
BinaryImpl(org.omwg.logicalexpression.LogicalExpression exprLeft, org.omwg.logicalexpression.LogicalExpression exprRight)
           
 
Method Summary
 org.omwg.logicalexpression.LogicalExpression getLeftOperand()
           
 org.omwg.logicalexpression.LogicalExpression getRightOperand()
           
 int hashCode()
           
 List<org.omwg.logicalexpression.LogicalExpression> listOperands()
           
 void setLeftOperand(org.omwg.logicalexpression.LogicalExpression le)
           
 void setOperands(List operands)
           
 void setRightOperand(org.omwg.logicalexpression.LogicalExpression le)
           
 
Methods inherited from class org.deri.wsmo4j.logicalexpression.LogicalExpressionImpl
getStringRepresentation, setStringRepresentation, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omwg.logicalexpression.LogicalExpression
accept, toString
 

Field Detail

exprLeft

protected org.omwg.logicalexpression.LogicalExpression exprLeft

exprRight

protected org.omwg.logicalexpression.LogicalExpression exprRight
Constructor Detail

BinaryImpl

public BinaryImpl(org.omwg.logicalexpression.LogicalExpression exprLeft,
                  org.omwg.logicalexpression.LogicalExpression exprRight)
           throws IllegalArgumentException
Parameters:
exprLeft - the logical expression left of the operator
exprRight - the logical expression right of the operator
Throws:
IllegalArgumentException -

in case one of the two logical expressions is null

in case the operator is different from AND, EQUIVALENT, IMPLIEDBY, IMPLIES, LP_IMPL or OR

in case one of the two logical expressions contains a nested CONSTRAINT

Method Detail

getLeftOperand

public org.omwg.logicalexpression.LogicalExpression getLeftOperand()
Specified by:
getLeftOperand in interface org.omwg.logicalexpression.Binary

getRightOperand

public org.omwg.logicalexpression.LogicalExpression getRightOperand()
Specified by:
getRightOperand in interface org.omwg.logicalexpression.Binary

listOperands

public List<org.omwg.logicalexpression.LogicalExpression> listOperands()
Specified by:
listOperands in interface org.omwg.logicalexpression.CompoundExpression
See Also:
CompoundExpression.listOperands()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setLeftOperand

public void setLeftOperand(org.omwg.logicalexpression.LogicalExpression le)
Specified by:
setLeftOperand in interface org.omwg.logicalexpression.Binary

setRightOperand

public void setRightOperand(org.omwg.logicalexpression.LogicalExpression le)
Specified by:
setRightOperand in interface org.omwg.logicalexpression.Binary

setOperands

public void setOperands(List operands)
Specified by:
setOperands in interface org.omwg.logicalexpression.CompoundExpression


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.