groovy.lang
Interface Range

All Superinterfaces:
Collection, 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: 1.8 $
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

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

getTo

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

isReverse

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

inspect

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


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