Groovy JDK

java.lang
Class Integer

Method Summary
Number power(Integer exponent)
Power of an integer to an integer certain exponent.
 
Method Detail

power

public Number power(Integer exponent)
 
Power of an integer 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

Groovy JDK