|
Groovy 1.7.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
groovy.lang.ObjectRange
class ObjectRange extends AbstractList
Represents an inclusive list of objects from a value to a value using comparators.
This class is similar to IntRange. If you make any changes to this class, you might consider making parallel changes to IntRange.Constructor Summary | |
ObjectRange(Comparable from, Comparable to)
Creates a new { |
|
ObjectRange(Comparable from, Comparable to, boolean reverse)
|
Method Summary | |
---|---|
boolean
|
contains(Object value)
|
boolean
|
containsWithinBounds(Object value)
Checks whether a value is between the from and to values of a Range |
protected Object
|
decrement(Object value)
Decrements by one |
boolean
|
equals(Object that)
{ |
boolean
|
equals(ObjectRange that)
Compares an { |
Object
|
get(int index)
{ |
Comparable
|
getFrom()
{ |
Comparable
|
getTo()
{ |
protected Object
|
increment(Object value)
Increments by one |
String
|
inspect()
{ |
boolean
|
isReverse()
{ |
Iterator
|
iterator()
{ |
int
|
size()
{ |
void
|
step(int step, Closure closure)
{ |
List
|
step(int step)
{ |
List
|
subList(int fromIndex, int toIndex)
{ |
String
|
toString()
{ |
Methods inherited from class AbstractList | |
---|---|
add, add, get, hashCode, indexOf, clear, equals, lastIndexOf, addAll, iterator, remove, set, listIterator, listIterator, subList, toString, contains, isEmpty, addAll, size, toArray, toArray, remove, containsAll, removeAll, retainAll, wait, wait, wait, getClass, notify, notifyAll, size |
Methods inherited from class AbstractCollection | |
---|---|
add, clear, toString, contains, isEmpty, addAll, iterator, size, toArray, toArray, remove, containsAll, removeAll, retainAll, wait, wait, wait, hashCode, getClass, equals, notify, notifyAll |
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Constructor Detail |
---|
public ObjectRange(Comparable from, Comparable to)
from
< to
.
public ObjectRange(Comparable from, Comparable to, boolean reverse)
Method Detail |
---|
public boolean contains(Object value)
public boolean containsWithinBounds(Object value)
protected Object decrement(Object value)
public boolean equals(Object that)
public boolean equals(ObjectRange that)
true
if the ranges are equal
public Object get(int index)
public Comparable getFrom()
public Comparable getTo()
protected Object increment(Object value)
public String inspect()
public boolean isReverse()
public Iterator iterator()
public int size()
public void step(int step, Closure closure)
public List step(int step)
public List subList(int fromIndex, int toIndex)
public String toString()
Copyright © 2003-2009 The Codehaus. All rights reserved.