jason.asSyntax
Class BinaryStructure

Package class diagram package BinaryStructure
java.lang.Object
  extended by jason.asSyntax.DefaultTerm
      extended by jason.asSyntax.Literal
          extended by jason.asSyntax.Atom
              extended by jason.asSyntax.Structure
                  extended by jason.asSyntax.BinaryStructure
All Implemented Interfaces:
LogicalFormula, Term, ToDOM, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Term>
Direct Known Subclasses:
LogExpr, RelExpr

public abstract class BinaryStructure
extends Structure

Represents a binary/unary logical/relational operator.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jason.asSyntax.Structure
emptyTermArray, emptyTermList
 
Fields inherited from class jason.asSyntax.Literal
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
 
Fields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo
 
Constructor Summary
BinaryStructure(java.lang.String id, Term arg)
          Constructor for unary operator
BinaryStructure(Term t1, java.lang.String id, Term t2)
          Constructor for binary operator
 
Method Summary
 org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
          get as XML
 Term getLHS()
          gets the LHS of this operation
 Term getRHS()
          gets the RHS of this operation
 boolean isUnary()
           
 java.lang.String toString()
           
 
Methods inherited from class jason.asSyntax.Structure
addTerm, addTerms, addTerms, apply, calcHashCode, clone, compareTo, countVars, delTerm, equals, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, hasVar, isAtom, isGround, isStructure, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerm, setTerms, varToReplace
 
Methods inherited from class jason.asSyntax.Atom
getFunctor
 
Methods inherited from class jason.asSyntax.Literal
addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnots, getAnnots, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, isLiteral, logicalConsequence, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated
 
Methods inherited from class jason.asSyntax.DefaultTerm
getErrorMsg, getSrcInfo, hashCode, isArithExpr, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jason.asSyntax.Term
getSrcInfo, isArithExpr, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, setSrcInfo
 

Constructor Detail

BinaryStructure

public BinaryStructure(Term t1,
                       java.lang.String id,
                       Term t2)
Constructor for binary operator


BinaryStructure

public BinaryStructure(java.lang.String id,
                       Term arg)
Constructor for unary operator

Method Detail

isUnary

public boolean isUnary()

getLHS

public Term getLHS()
gets the LHS of this operation


getRHS

public Term getRHS()
gets the RHS of this operation


toString

public java.lang.String toString()
Overrides:
toString in class Structure

getAsDOM

public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
get as XML

Specified by:
getAsDOM in interface ToDOM
Overrides:
getAsDOM in class Structure