groovy.lang
Interface Range

All Superinterfaces:
Collection, Iterable, List
All Known Implementing Classes:
EmptyRange, IntRange, ObjectRange

public interface Range
extends List

Represents the interface of a Range implementation which includes the from and to values

Version:
$Revision: 641 $
Author:
James Strachan

Method Summary
 Comparable getFrom()
           
 Comparable getTo()
           
 String inspect()
           
 boolean isReverse()
           
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

getFrom

Comparable getFrom()
Returns:
the lower value in the range

getTo

Comparable getTo()
Returns:
the upper value in the range

isReverse

boolean isReverse()
Returns:
true if this is a reverse range, iterating backwards starting from the to value and ending on the from value

inspect

String inspect()
Returns:
the verbose String representation of this Range as would be typed into a console to create the Range instance


Copyright © 2003-2009 The Codehaus. All Rights Reserved.