java.lang
Class Long
Method Summary |
long
|
abs()
Get the absolute value
|
void
|
downto(Number to, Closure closure)
Iterates from this number down to the given number, inclusive,
decrementing by one each time.
|
Number
|
power(Integer exponent)
Power of a long to an integer certain exponent.
|
void
|
upto(Number to, Closure closure)
Iterates from this number up to the given number, inclusive,
incrementing by one each time.
|
abs
public long abs()
-
- Get the absolute value
- Returns:
- the absolute value of that Long
- Since:
- 1.0
downto
public void downto(Number to, Closure closure)
-
- Iterates from this number down to the given number, inclusive,
decrementing by one each time.
- Parameters:
to
- the end number.
closure
- the code to execute for each number.
- Since:
- 1.0
power
public Number power(Integer exponent)
-
- Power of a long to an integer certain exponent. If the
exponent is positive, convert to a BigInteger and call
BigInteger.pow(int) method to maintain precision. Called by the
'**' operator.
- Parameters:
exponent
- an Integer exponent.
- Returns:
- a Number to the power of a the exponent
upto
public void upto(Number to, Closure closure)
-
- Iterates from this number up to the given number, inclusive,
incrementing by one each time.
- Parameters:
to
- the end number.
closure
- the code to execute for each number.
- Since:
- 1.0