groovy.lang
Interface Range

All Superinterfaces:
java.util.Collection, java.lang.Iterable, java.util.List
All Known Implementing Classes:
EmptyRange, IntRange, ObjectRange

public interface Range
extends java.util.List

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

Version:
$Revision: 641 $
Author:
James Strachan

Method Summary
 java.lang.Comparable getFrom()
           
 java.lang.Comparable getTo()
           
 java.lang.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

java.lang.Comparable getFrom()
Returns:
the lower value in the range

getTo

java.lang.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

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


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