Hilbert II - Version 0.03.01

org.qedeq.kernel.parser
Class Term

java.lang.Object
  extended byorg.qedeq.kernel.parser.Term

public final class Term
extends Object

Parsed term.

Version:
$Revision: 1.4 $

Constructor Summary
Term(Atom atom)
          Constructor.
Term(Operator operator)
          Constructor.
Term(Operator operator, Term firstArgument)
          Constructor.
 
Method Summary
 void addArgument(Term term)
          Add next argument term to operator.
 Operator getOperator()
          Get operator of term.
 String getQedeq()
          Get QEDEQ representation of this term.
 String getQedeqXml()
          Get QEDEQ XML representation of this term.
 boolean isAtom()
          Is this term an atom?
 int size()
          Get number of arguments of this operator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Term

public Term(Atom atom)
Constructor.

Parameters:
atom - Term atom.

Term

public Term(Operator operator)
Constructor.

Parameters:
operator - Construct new term for this operator.

Term

public Term(Operator operator,
            Term firstArgument)
Constructor.

Parameters:
operator - Construct new term for this operator.
firstArgument - First argument of operator.
Method Detail

isAtom

public final boolean isAtom()
Is this term an atom?

Returns:
Is this term an atom?

addArgument

public final void addArgument(Term term)
Add next argument term to operator. Overall number of arguments must not exceed Operator.getMax() (if >= 0). Addition is only possible if this is no atom term (see Term(Atom)).

Parameters:
term - Add this argument at last position.
Throws:
IllegalArgumentException - This is an atom term or argument maximum exceeded.

getOperator

public final Operator getOperator()
Get operator of term. Can be null if this is an atom term.

Returns:
Term operator.

size

public final int size()
Get number of arguments of this operator.

Returns:
Argument number.

getQedeq

public final String getQedeq()
Get QEDEQ representation of this term.

Returns:
QEDEQ representation.

getQedeqXml

public final String getQedeqXml()
Get QEDEQ XML representation of this term.

Returns:
QEDEQ XML representation.

Hilbert II - Version 0.03.01

©left GNU General Public Licence
All Rights Reserved.