|
Groovy JDK | |||||||||
| Method Summary | |
|---|---|
void
|
downto(Number to, Closure closure)
Iterates from this number down to the given number, inclusive, decrementing by one each time Example: 10 println it }Prints numbers 10 |
Number
|
multiply(Double right)
Multiply a BigDecimal and a Double Note: This method was added to enforce the Groovy rule of BigDecimal*Double == Double multiply(BigDecimal) method in BigDecimal would respond and return a BigDecimal instead over Number, the Number*Number method is not choosen as in older versions of Groovy |
Number
|
multiply(BigInteger right)
Multiply a BigDecimal and a BigInteger Note: This method was added to enforce the Groovy rule of BigDecimal*long == long multiply(BigDecimal) method in BigDecimal would respond and return a BigDecimal instead over Number, the Number*Number method is not choosen as in older versions of Groovy types in Groovy |
void
|
upto(Number to, Closure closure)
Iterates from this number up to the given number, inclusive, incrementing by one each time 0 println it }Prints numbers 0 |
| Method Detail |
|---|
public void downto(Number to, Closure closure)
10.5.downto(0) {
println it
}
Prints numbers 10.5, 9.5 ... to 0.5.
to - the end number.
closure - the code to execute for each number.
public Number multiply(Double right)
right - a Double.
public Number multiply(BigInteger right)
right - a BigInteger.
public void upto(Number to, Closure closure)
0.upto( 10 ) {
println it
}
Prints numbers 0.1, 1.1, 2.1... to 9.1
to - the end number.
closure - the code to execute for each number.
|
Groovy JDK | |||||||||