Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hartmath.expression
Interface HObject  view HObject download HObject.java

All Known Implementing Classes:
HComplex, HDouble, HDoubleComplex, HExpression, HFraction, HFunction, HInteger, HPattern

public interface HObject

Interface that represents a math object: integer, fraction, complex, string, symbol, pattern, function,...


Field Summary
static byte COMPLEXFILEID
          Description of the Field
static int COMPLEXID
          Description of the Field
static byte DOUBLECOMPLEXFILEID
          Description of the Field
static int DOUBLECOMPLEXID
          Description of the Field
static byte DOUBLEFILEID
          Description of the Field
static int DOUBLEID
          Description of the Field
static byte FRACTIONFILEID
          Description of the Field
static int FRACTIONID
          Description of the Field
static byte FUNCTIONFILEID
          Description of the Field
static int FUNCTIONID
          Description of the Field
static byte INTEGERFILEID
          Description of the Field
static int INTEGERID
          Description of the Field
static int OBJECTID
          Description of the Field
static byte PATTERNFILEID
          Description of the Field
static int PATTERNID
          Description of the Field
static byte STRINGFILEID
          Description of the Field
static int STRINGID
          Description of the Field
static byte SYMBOLFILEID
          Description of the Field
static int SYMBOLID
          Description of the Field
 
Method Summary
 HObject apply(HObject head, com.hartmath.lib.Session session)
          Method declaration
 HObject evaluate(com.hartmath.lib.Session session)
          Evaluate this.
 boolean greater(com.hartmath.lib.Session session, java.lang.Object obj)
          Returns true if this is greater to obj
 HSymbol head()
          Write a persistant object Returns the associated header-symbol of this HObject e.g for a HInteger object the symbol C.Integer will be returned and for a HFunction the special header-symbol will be retuned
 int hierarchy()
          Returns an specific integer value for each class in the HObject class-hierarchy
 boolean isHeadMember(HSymbol sym)
          Returns true if this contains the HSymbol sym as a header
 boolean isList()
          Returns true if this is an instance of HFunction with the header symbol C.List @ see C
 boolean isMember(HObject obj)
          Returns true if this contains the HObject obj
 boolean isNumber()
          Returns true if this is a number e.g.
 boolean isRational()
          Returns true if this is a rational number e.g.
 boolean less(com.hartmath.lib.Session session, java.lang.Object obj)
          Returns true if this is less to obj
 boolean matches(HObject obj, com.hartmath.lib.Session session)
          Returns true if this (pattern-)matches the object obj
 int precedence()
          Operator precedence of the mathematical object
 HObject substitute(HObject obj, HObject subst)
          Substitute the HObject obj in this with the HObject subst
 HObject substitutePattern(com.hartmath.lib.Session session)
          Substitute all HPattern-objects in this with the HObject subst
 void toStringBuffer(java.lang.StringBuffer buf, com.hartmath.lib.Session session)
          Use this method instead of toString() to display the expression as a String
 boolean unequals(java.lang.Object obj)
          Returns true if this is not equal to obj
 

Field Detail

DOUBLEID

public static final int DOUBLEID
Description of the Field

See Also:
Constant Field Values

DOUBLECOMPLEXID

public static final int DOUBLECOMPLEXID
Description of the Field

See Also:
Constant Field Values

INTEGERID

public static final int INTEGERID
Description of the Field

See Also:
Constant Field Values

FRACTIONID

public static final int FRACTIONID
Description of the Field

See Also:
Constant Field Values

COMPLEXID

public static final int COMPLEXID
Description of the Field

See Also:
Constant Field Values

STRINGID

public static final int STRINGID
Description of the Field

See Also:
Constant Field Values

SYMBOLID

public static final int SYMBOLID
Description of the Field

See Also:
Constant Field Values

FUNCTIONID

public static final int FUNCTIONID
Description of the Field

See Also:
Constant Field Values

PATTERNID

public static final int PATTERNID
Description of the Field

See Also:
Constant Field Values

OBJECTID

public static final int OBJECTID
Description of the Field

See Also:
Constant Field Values

DOUBLEFILEID

public static final byte DOUBLEFILEID
Description of the Field

See Also:
Constant Field Values

DOUBLECOMPLEXFILEID

public static final byte DOUBLECOMPLEXFILEID
Description of the Field

See Also:
Constant Field Values

INTEGERFILEID

public static final byte INTEGERFILEID
Description of the Field

See Also:
Constant Field Values

FRACTIONFILEID

public static final byte FRACTIONFILEID
Description of the Field

See Also:
Constant Field Values

COMPLEXFILEID

public static final byte COMPLEXFILEID
Description of the Field

See Also:
Constant Field Values

STRINGFILEID

public static final byte STRINGFILEID
Description of the Field

See Also:
Constant Field Values

SYMBOLFILEID

public static final byte SYMBOLFILEID
Description of the Field

See Also:
Constant Field Values

FUNCTIONFILEID

public static final byte FUNCTIONFILEID
Description of the Field

See Also:
Constant Field Values

PATTERNFILEID

public static final byte PATTERNFILEID
Description of the Field

See Also:
Constant Field Values
Method Detail

unequals

public boolean unequals(java.lang.Object obj)
Returns true if this is not equal to obj


less

public boolean less(com.hartmath.lib.Session session,
                    java.lang.Object obj)
Returns true if this is less to obj


greater

public boolean greater(com.hartmath.lib.Session session,
                       java.lang.Object obj)
Returns true if this is greater to obj


evaluate

public HObject evaluate(com.hartmath.lib.Session session)
Evaluate this.


matches

public boolean matches(HObject obj,
                       com.hartmath.lib.Session session)
Returns true if this (pattern-)matches the object obj


substitute

public HObject substitute(HObject obj,
                          HObject subst)
Substitute the HObject obj in this with the HObject subst


substitutePattern

public HObject substitutePattern(com.hartmath.lib.Session session)
Substitute all HPattern-objects in this with the HObject subst


toStringBuffer

public void toStringBuffer(java.lang.StringBuffer buf,
                           com.hartmath.lib.Session session)
Use this method instead of toString() to display the expression as a String


hierarchy

public int hierarchy()
Returns an specific integer value for each class in the HObject class-hierarchy


head

public HSymbol head()
Write a persistant object Returns the associated header-symbol of this HObject e.g for a HInteger object the symbol C.Integer will be returned and for a HFunction the special header-symbol will be retuned


apply

public HObject apply(HObject head,
                     com.hartmath.lib.Session session)
Method declaration


isList

public boolean isList()
Returns true if this is an instance of HFunction with the header symbol C.List @ see C


isNumber

public boolean isNumber()
Returns true if this is a number e.g. HInteger, HFraction, HComplex, HDouble or HDoubleComplex


isRational

public boolean isRational()
Returns true if this is a rational number e.g. HInteger, HFraction


isMember

public boolean isMember(HObject obj)
Returns true if this contains the HObject obj


isHeadMember

public boolean isHeadMember(HSymbol sym)
Returns true if this contains the HSymbol sym as a header


precedence

public int precedence()
Operator precedence of the mathematical object