groovy.lang
Class Range

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--groovy.lang.Range
All Implemented Interfaces:
Collection, List

public class Range
extends AbstractList

Represents a list of objects from a value to a value using comparators

Version:
$Revision: 1.5 $
Author:
James Strachan

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Range(Comparable from, Comparable to)
           
 
Method Summary
 boolean contains(Comparable value)
           
protected  Object decrement(Object value)
           
 boolean equals(Object that)
           
 boolean equals(groovy.lang.Range that)
           
 Object get(int index)
           
 Comparable getFrom()
           
 Comparable getTo()
           
 int hashCode()
           
protected  Object increment(Object value)
           
 int size()
           
 List step(int step)
           
 void step(int step, groovy.lang.Closure closure)
           
 List subList(int fromIndex, int toIndex)
           
 String toString()
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

Range

public Range(Comparable from,
             Comparable to)
Method Detail

hashCode

public int hashCode()
Specified by:
hashCode in interface List
Overrides:
hashCode in class AbstractList

equals

public boolean equals(Object that)
Specified by:
equals in interface List
Overrides:
equals in class AbstractList

equals

public boolean equals(groovy.lang.Range that)

getFrom

public Comparable getFrom()

getTo

public Comparable getTo()

get

public Object get(int index)
Specified by:
get in interface List
Specified by:
get in class AbstractList

size

public int size()
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

subList

public List subList(int fromIndex,
                    int toIndex)
Specified by:
subList in interface List
Overrides:
subList in class AbstractList

toString

public String toString()
Overrides:
toString in class AbstractCollection

contains

public boolean contains(Comparable value)

step

public void step(int step,
                 groovy.lang.Closure closure)

step

public List step(int step)

increment

protected Object increment(Object value)

decrement

protected Object decrement(Object value)


Copyright © 2003 The Codehaus. All Rights Reserved.