Package: java.lang

## [Java] Class Long

- java.lang.Long

-     public class Long
      extends Object

  GDK enhancements for Long.

  displayName:
    Long
  receiverFqcn:
    java.lang.Long

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public long` | `abs()` Gets the absolute value.
    `` | `public void` | `downto(Number to, Closure closure)` Iterates from this number down to the given number, inclusive, decrementing by one each time.
    `` | `public Number` | `power(Integer exponent)` Power of a long to an integer certain exponent.
    `` | `public void` | `upto(Number to, Closure closure)` Iterates from this number up to the given number, inclusive, incrementing by one each time.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### public long abs()

      Gets the absolute value.

      Returns:
        the absolute value of that Long
      Since:
        1.0

    - #### 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

    - #### 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 the exponent

    - #### 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