groovy.lang
Class IntRange

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

public class IntRange
extends AbstractList

Represents a list of Integer objects from a specified int up to but not including a given and to.

Version:
$Revision: 1.3 $
Author:
James Strachan

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
IntRange(int from, int to)
           
 
Method Summary
 boolean contains(Object value)
           
 boolean equals(groovy.lang.IntRange that)
           
 boolean equals(Object that)
           
 Object get(int index)
           
 int getFrom()
           
 int getTo()
           
 int hashCode()
           
 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, 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, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

IntRange

public IntRange(int from,
                int to)
Method Detail

equals

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

equals

public boolean equals(groovy.lang.IntRange that)

getFrom

public int getFrom()

getTo

public int 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

hashCode

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

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(Object value)
Specified by:
contains in interface List
Overrides:
contains in class AbstractCollection

step

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

step

public List step(int step)


Copyright © 2003 The Codehaus. All Rights Reserved.