ua.gradsoft.termware
Class CharTerm

java.lang.Object
  extended by ua.gradsoft.termware.Term
      extended by ua.gradsoft.termware.AbstractPrimitiveTerm
          extended by ua.gradsoft.termware.CharTerm
All Implemented Interfaces:
Serializable, Cloneable

public class CharTerm
extends AbstractPrimitiveTerm

Term which contains char.

See Also:
Term, Serialized Form

Method Summary
 boolean eq(Term x)
          are term logically equals to x ?
 char getChar()
          return incapsulated character.
 String getName()
          get name of functional symbol.
 Number getNumber()
          in this class just throws UnsupportedOperationException
 int getPrimaryType0()
          return code of level-0 primary type
 boolean isChar()
          is term is char ?
 boolean isNumber()
          is term is Number ?
 void print(PrintWriter out)
          print term to out
 Term termClone()
          Char is immutable, so return this.
 int termCompare(Term t)
          compare functions.
 String toString()
           
 
Methods inherited from class ua.gradsoft.termware.AbstractPrimitiveTerm
boundEquals, boundUnify, clone, concreteOrder, createSame, emptyFv, findSubtermIndexBoundEqualsTo, freeEquals, freeUnify, getArity, getBigDecimal, getBigInteger, getBoolean, getByte, getDouble, getFloat, getInt, getJavaObject, getLong, getNameIndex, getPatternName, getPatternNameIndex, getShort, getString, getSubtermAt, getTerm, getXIndex, isAtom, isBigDecimal, isBigInteger, isBoolean, isByte, isComplexTerm, isDouble, isFloat, isInt, isJavaObject, isLong, isNil, isShort, isString, isX, maxFv, minFv, setSubtermAt, shiftFv, subst, substInside
 
Methods inherited from class ua.gradsoft.termware.Term
containsSubtermBoundEqualsTo, getAsBigDecimal, getAsBigInteger, getAsBoolean, getAsByte, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsJavaObject, getAsLong, getAsNumber, getAsShort, getAsString, getPrimaryType1, print, println, println
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getPrimaryType0

public final int getPrimaryType0()
Description copied from class: Term
return code of level-0 primary type

Specified by:
getPrimaryType0 in class Term
Returns:
PrimaryTypes.CHAR
See Also:
PrimaryTypes

isChar

public final boolean isChar()
Description copied from class: Term
is term is char ?

Overrides:
isChar in class AbstractPrimitiveTerm
Returns:
true

getChar

public final char getChar()
return incapsulated character.

Overrides:
getChar in class AbstractPrimitiveTerm
Returns:
string

isNumber

public final boolean isNumber()
Description copied from class: Term
is term is Number ?

Specified by:
isNumber in class Term
Returns:
false

getNumber

public final Number getNumber()
                       throws UnsupportedOperationException
in this class just throws UnsupportedOperationException

Specified by:
getNumber in class Term
Returns:
number value
Throws:
UnsupportedOperationException - raised if this term does not represent numeric value.

termCompare

public final int termCompare(Term t)
Description copied from class: Term
compare functions. define ordering on set of terms. Note, that ordering is not the same as Java build-in compare.

Specified by:
termCompare in class AbstractPrimitiveTerm
Parameters:
t - - term to compare
See Also:
Term.termCompare(ua.gradsoft.termware.Term)

getName

public final String getName()
Description copied from class: Term
get name of functional symbol.

Specified by:
getName in class AbstractPrimitiveTerm
Returns:
incapsulated string

eq

public boolean eq(Term x)
are term logically equals to x ?

Specified by:
eq in class AbstractPrimitiveTerm
Parameters:
x - - term to compare

termClone

public Term termClone()
Char is immutable, so return this.

Specified by:
termClone in class AbstractPrimitiveTerm

print

public void print(PrintWriter out)
print term to out

Specified by:
print in class AbstractPrimitiveTerm
Parameters:
out - - where to print.

toString

public String toString()
Overrides:
toString in class Object