groovy.lang
Class IntRange
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--groovy.lang.IntRange
- All Implemented Interfaces:
- Collection, List, Range
- public class IntRange
- extends AbstractList
- implements Range
Represents a list of Integer objects from a specified int up to but not including
a given and to.
- Version:
- $Revision: 1.4 $
- Author:
- James Strachan
Constructor Summary |
IntRange(int from,
int to)
|
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, toArray, toArray |
IntRange
public IntRange(int from,
int to)
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 Comparable getFrom()
- Specified by:
getFrom
in interface Range
- Returns:
- the lower value in the range
getTo
public Comparable getTo()
- Specified by:
getTo
in interface Range
- Returns:
- the upper value in the range
getFromInt
public int getFromInt()
getToInt
public int getToInt()
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.