hussam.math.operations
Class ConstantNumber
java.lang.Object
hussam.math.operations.ConstantNumber
- All Implemented Interfaces:
- Operation
public final class ConstantNumber
- extends java.lang.Object
- implements Operation
هذه الفئة تمثل رقما عمليا مثل: 4و 5و 40و -123,345345. الفئة في السابق كانت تسمى Number This resembles a Constant Number like 4 , 3000, 5234, or -1234.23452. The old Version of the class was called Number. I changed it to ConstantNumber so that you dont need to use the full name of the class to distinguish between it and java.lang.Number.
- Version:
- 2.0
- Author:
- Hussam AlMulhim حسام الملحم
- See Also:
Variable, Function
| Field Summary |
|---|
protected double | number The double value. |
| Constructor Summary |
|---|
ConstantNumber(double x) Constructs a Constant Number. |
| Method Summary |
|---|
double | result() returns the result of the operation. |
java.lang.String | toString() Returns the double value stored in this ConstantNumber. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
number
protected double number
- The double value.
ConstantNumber
public ConstantNumber(double x)
- Constructs a Constant Number.
- Parameters:
x - the double value for the ConstantNumber to represent. the result method would reutrn this value.
result
public double result()
- Description copied from interface:
Operation returns the result of the operation.
- Specified by:
result in interface Operation
- Returns:
- The result value.
toString
public java.lang.String toString()
- Returns the double value stored in this ConstantNumber.
- Overrides:
toString in class java.lang.Object
- Returns:
- The double value.