Numbers utilizing a provided NumberSystem.
| Modifier and Type | Field and Description |
|---|---|
| private Number | |
| private final NumberSystem |
| Access | Constructor and Description |
|---|---|
| private | Calculator(NumberSystem
the ns)NumberSystemReturns a new instance of a |
| private | Calculator()
Returns a new instance of a This implementation is *not* thread-safe, hence threads should not share instances of this. |
| Modifier and Type | Method and Description |
|---|---|
| public Calculator | Returns: selfCalculates the absolute value of this |
| public Calculator | |
| public Calculator | |
| public Calculator | Returns: selfCalculates Euler's constant taken to the power of this |
| private static Calculator | getInstance()
Returns a new instance of a This implementation is *not* thread-safe, hence threads should not share instances of this. |
| public boolean | |
| private Calculator | |
| public Calculator | Returns: selfCalculates the natural logarithm of this |
| public Calculator | |
| public Calculator | Returns: selfCalculates the additive inverse value of this |
| public static Calculator | |
| public Number | Returns: a narrowed version of thisCalculator´s accumulatorAllows to 'peek' at this |
| public Calculator | Returns: selfTakes this |
| public Calculator | Returns: selfCalculates the multiplicative inverse value of this |
| public Calculator |
| Calculator | back to summary |
|---|---|
| private Calculator(NumberSystem ns) Returns a new instance of a
| |
| Calculator | back to summary |
|---|---|
| private Calculator() Returns a new instance of a This implementation is *not* thread-safe, hence threads should not share instances of this. | |
| abs | back to summary |
|---|---|
| public Calculator abs() Calculates the absolute value of this
| |
| add | back to summary |
|---|---|
| public Calculator add(Number number) Adds
| |
| divide | back to summary |
|---|---|
| public Calculator divide(Number number) Divides this
| |
| exp | back to summary |
|---|---|
| public Calculator exp() Calculates Euler's constant taken to the power of this
| |
| getInstance | back to summary |
|---|---|
| private static Calculator getInstance() Returns a new instance of a This implementation is *not* thread-safe, hence threads should not share instances of this.
| |
| isLessThanOne | back to summary |
|---|---|
public boolean isLessThanOne()
| |
| load | back to summary |
|---|---|
| private Calculator load(Number number) Loads
| |
| log | back to summary |
|---|---|
| public Calculator log() Calculates the natural logarithm of this
| |
| multiply | back to summary |
|---|---|
| public Calculator multiply(Number number) Multiplies
| |
| negate | back to summary |
|---|---|
| public Calculator negate() Calculates the additive inverse value of this
| |
| of | back to summary |
|---|---|
| public static Calculator of(Number number) Shortcut for
| |
| peek | back to summary |
|---|---|
| public Number peek() Allows to 'peek' at this
| |
| power | back to summary |
|---|---|
| public Calculator power(int exponent) Takes this
| |
| reciprocal | back to summary |
|---|---|
| public Calculator reciprocal() Calculates the multiplicative inverse value of this
| |
| subtract | back to summary |
|---|---|
| public Calculator subtract(Number number) Subtracts
| |