Package: groovy.lang

## [Java] Interface Range

-     public interface Range

  GDK enhancements for Range.

  displayName:
    Range
  receiverFqcn:
    groovy.lang.Range

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `groovyToString()` Returns Groovy's default string representation for a Range.

- - ### Method Detail

    - #### public String groovyToString()

      Returns Groovy's default string representation for a Range. By default, it delegates to `Range#toString()`, producing the compact `from..to` notation.

           assert (1..4).groovyToString() == '1..4'

      This method exists to stop the `groovyToString(Collection)` variant from overriding the built-in `Range#toString`. Since a range is a list, you can use `range.toListString()` to print it using normal list formatting.

      Returns:
        the string representation
      Since:
        6.0.0