|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Number org.norther.tammi.acorn.math.Equation
public abstract class Equation
A numeric equation.
Constructor Summary | |
---|---|
Equation(boolean ignoreNaNs,
double... operands)
Constructs a new double equation. |
|
Equation(boolean ignoreNaNs,
float... operands)
Constructs a new float equation. |
|
Equation(byte... operands)
Constructs a new byte equation. |
|
Equation(double... operands)
Constructs a new double equation. |
|
Equation(float... operands)
Constructs a new float equation. |
|
Equation(int... operands)
Constructs a new int equation. |
|
Equation(long... operands)
Constructs a new long equation. |
|
Equation(short... operands)
Constructs a new short equation. |
Method Summary | |
---|---|
byte |
byteValue()
|
byte |
byteValue(int index)
Gets the indexed byte operand. |
protected abstract Number |
calculate(Object operands,
int length,
boolean ignoreNaNs)
Calculates the result. |
int |
compareTo(Number number)
|
double |
doubleValue()
|
double |
doubleValue(int index)
Gets the indexed double operand. |
boolean |
equals(Object other)
|
float |
floatValue()
|
float |
floatValue(int index)
Gets the indexed float operand. |
int |
getLength()
Gets the length of the equation. |
Class<?> |
getOperandType()
Gets the type of operands. |
Number |
getResult()
Gets the result. |
int |
intValue()
|
int |
intValue(int index)
Gets the indexed int operand. |
protected boolean |
isFloatingPoint(Object operands)
Checks whether the operands are floating point numbers. |
long |
longValue()
|
long |
longValue(int index)
Gets the indexed long operand. |
short |
shortValue()
|
short |
shortValue(int index)
Gets the indexed short operand. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Equation(byte... operands)
operands
- the operands.public Equation(short... operands)
operands
- the operands.public Equation(int... operands)
operands
- the operands.public Equation(long... operands)
operands
- the operands.public Equation(float... operands)
operands
- the operands.public Equation(boolean ignoreNaNs, float... operands)
ignoreNaNs
- ignore NaNs if true.operands
- the operands.public Equation(double... operands)
operands
- the operands.public Equation(boolean ignoreNaNs, double... operands)
ignoreNaNs
- ignore NaNs if true.operands
- the operands.Method Detail |
---|
public Number getResult()
public Class<?> getOperandType()
public int getLength()
public byte byteValue(int index)
index
- the index.
public short shortValue(int index)
index
- the index.
public int intValue(int index)
index
- the index.
public long longValue(int index)
index
- the index.
public float floatValue(int index)
index
- the index.
public double doubleValue(int index)
index
- the index.
public byte byteValue()
byteValue
in class Number
public short shortValue()
shortValue
in class Number
public int intValue()
intValue
in class Number
public long longValue()
longValue
in class Number
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
public int compareTo(Number number)
compareTo
in interface Comparable<Number>
protected boolean isFloatingPoint(Object operands)
operands
- the operands.
protected abstract Number calculate(Object operands, int length, boolean ignoreNaNs)
operands
- an array of operands.length
- the number of operands.ignoreNaNs
- ignore NaNs if true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |