org.deri.wsmo4j.logicalexpression
Class UnaryImpl

java.lang.Object
  extended by org.deri.wsmo4j.logicalexpression.LogicalExpressionImpl
      extended by org.deri.wsmo4j.logicalexpression.UnaryImpl
All Implemented Interfaces:
org.omwg.logicalexpression.CompoundExpression, org.omwg.logicalexpression.LogicalExpression, org.omwg.logicalexpression.Unary
Direct Known Subclasses:
ConstraintImpl, NegationAsFailureImpl, NegationImpl, QuantifiedImpl

public abstract class UnaryImpl
extends LogicalExpressionImpl
implements org.omwg.logicalexpression.Unary

This class reunites all unary logical expressions (e.g op LogExpr)

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:
Unary

Field Summary
protected  org.omwg.logicalexpression.LogicalExpression expr
           
 
Constructor Summary
UnaryImpl(org.omwg.logicalexpression.LogicalExpression expr)
           
 
Method Summary
abstract  void accept(org.omwg.logicalexpression.Visitor v)
           
 org.omwg.logicalexpression.LogicalExpression getOperand()
           
 int hashCode()
           If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
 List<org.omwg.logicalexpression.LogicalExpression> listOperands()
           
 void setOperand(org.omwg.logicalexpression.LogicalExpression le)
           
 void setOperands(List operands)
           
 
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
toString
 

Field Detail

expr

protected org.omwg.logicalexpression.LogicalExpression expr
Constructor Detail

UnaryImpl

public UnaryImpl(org.omwg.logicalexpression.LogicalExpression expr)
          throws IllegalArgumentException
Parameters:
expr - the logical expression
Throws:
in - case the logical expression contains a nested CONSTRAINT
IllegalArgumentException
Method Detail

listOperands

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

getOperand

public org.omwg.logicalexpression.LogicalExpression getOperand()
Specified by:
getOperand in interface org.omwg.logicalexpression.Unary

accept

public abstract void accept(org.omwg.logicalexpression.Visitor v)
Specified by:
accept in interface org.omwg.logicalexpression.LogicalExpression

hashCode

public int hashCode()

If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. However, it is not required that if two objects are unequal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results.

This method should be overriden, when the equals(Object) method is overriden.

Overrides:
hashCode in class Object
Returns:
A hash code value for this Object.
See Also:
Object.hashCode(), Object.equals(Object), com.ontotext.wsmo4j.ontology.LogicalExpressionImpl#hashCode()

setOperand

public void setOperand(org.omwg.logicalexpression.LogicalExpression le)
                throws IllegalArgumentException
Specified by:
setOperand in interface org.omwg.logicalexpression.Unary
Throws:
IllegalArgumentException

setOperands

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


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