public interface Range
GDK enhancements for Range.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
groovyToString()Returns Groovy's default string representation for a Range. |
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.