Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

jscicalc.expression.SumOrProduct Class Reference

This class represents a sum or product of Expression objects. More...

Collaboration diagram for jscicalc.expression.SumOrProduct:
Collaboration graph
[legend]

List of all members.

Public Member Functions

final Complex getComplex ()
 Get the Complex.
final java.util.LinkedList
< Expression
getExpressionList ()
 Get the Expression list.
boolean isZero ()
 Test for equality to zero.
void sort ()
 Sort the class.
OObject auto_simplify ()
 Automatic simplifications.

Static Public Member Functions

static int compare (java.util.LinkedList< Expression > expressionList1, java.util.LinkedList< Expression > expressionList2)
 Used for comparing lists.

Protected Member Functions

 SumOrProduct ()
 Construct.

Protected Attributes

Complex complex
 The SumOrProduct should always contain precisely one Complex (default value of zero).
java.util.LinkedList< ExpressionexpressionList
 The Expression objects.

Detailed Description

This class represents a sum or product of Expression objects.

expression.

See also:
OObject
Author:
J. D. Lamb
Version:
Revision:
1.3

Constructor & Destructor Documentation

jscicalc.expression.SumOrProduct.SumOrProduct (  )  [protected]

Construct.


Member Function Documentation

OObject jscicalc.expression.SumOrProduct.auto_simplify (  ) 

Automatic simplifications.

Returns:
this

Reimplemented from jscicalc.OObject.

Reimplemented in jscicalc.expression.Product, and jscicalc.expression.Sum.

static int jscicalc.expression.SumOrProduct.compare ( java.util.LinkedList< Expression expressionList1,
java.util.LinkedList< Expression expressionList2 
) [static]

Used for comparing lists.

Checks lists for equivalence in much the same way you would check strings for equivalence.

Parameters:
expressionList1 The first list
expressionList2 The second list
Returns:
&#8722;1 if expressionList1 is considered less than expressionList2, 1 if expressionList1 is considered greater than expressionList2 and 0 if they are identical

References jscicalc.expression.Expression.compareTo().

Referenced by jscicalc.expression.Sum.compareTo(), and jscicalc.expression.Product.compareTo().

final Complex jscicalc.expression.SumOrProduct.getComplex (  ) 

Get the Complex.

Returns:
The Complex

References jscicalc.expression.SumOrProduct.complex.

Referenced by jscicalc.expression.Sum.auto_simplify().

final java.util.LinkedList<Expression> jscicalc.expression.SumOrProduct.getExpressionList (  ) 
boolean jscicalc.expression.SumOrProduct.isZero (  ) 
void jscicalc.expression.SumOrProduct.sort (  ) 

Member Data Documentation


The documentation for this class was generated from the following file: