Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class nl.coffee.math.AbstractCompositeNumber

java.lang.Object
  |
  +--java.lang.Number
        |
        +--nl.coffee.math.AbstractRealNumber
              |
              +--nl.coffee.math.AbstractCompositeNumber
Subclasses:
Power, Product, Sum

public abstract class AbstractCompositeNumber
extends AbstractRealNumber
implements CompositeNumber
Abstract base class for CompositeNumber implementations. This implementation is based on an array. Concrete subclasses should initialize the array upon construction.

Since:
JUMP_1.0
Version:
1.1 199809.24
Author:
Ernst de Haan
See Also:
Serialized Form

Field Summary
RealNumber[] elements
          The elements of this operation.
 
Constructor Summary
AbstractCompositeNumber()
           
 
Method Summary
RealNumber getElement(int n)
           
int getElementCount()
           
RealNumber[] getElements()
           
 
Methods inherited from class nl.coffee.math.AbstractRealNumber
abs, add, byteValue, compareTo, divide, doubleValue, equals, fitsByte, fitsDouble, fitsFloat, fitsInt, fitsLong, fitsShort, floatValue, hashCode, intValue, invert, longValue, multiply, negate, pow, retryCompare, shortValue, subtract, toBigDecimal, toBigInteger
 
Methods inherited from class java.lang.Number
byteValue, doubleValue, floatValue, intValue, longValue, shortValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

elements

protected RealNumber[] elements
The elements of this operation.

Concrete subclasses must initialize this field upon construction.

Constructor Detail

AbstractCompositeNumber

public AbstractCompositeNumber()
Method Detail

getElements

public RealNumber[] getElements()
Description copied from interface:
Returns the operands.
Specified by:
getElements in interface CompositeNumber

getElementCount

public int getElementCount()
Description copied from interface:
Counts the number of operands in this CompositeNumber.
Specified by:
getElementCount in interface CompositeNumber

getElement

public RealNumber getElement(int n)
                                    throws java.lang.IndexOutOfBoundsException
Description copied from interface:
Returns the nth operand of this CompositeNumber.
Specified by:
getElement in interface CompositeNumber

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD