|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList
groovy.lang.EmptyRange
public class EmptyRange
Constructing Ranges like 0..<0
| Field Summary | |
|---|---|
protected java.lang.Comparable |
at
The value at which the range originates (may be null). |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
EmptyRange(java.lang.Comparable at)
Creates a new EmptyRange. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object o)
Always throws UnsupportedOperationException for an empty range. |
boolean |
addAll(java.util.Collection c)
Always throws UnsupportedOperationException for an empty range. |
boolean |
addAll(int index,
java.util.Collection c)
Always throws UnsupportedOperationException for an empty range. |
boolean |
containsWithinBounds(java.lang.Object o)
Never true for an empty range. |
java.lang.Object |
get(int index)
Always throws IndexOutOfBoundsException for an empty range. |
java.lang.Comparable |
getFrom()
The lower value in the range. |
java.lang.Comparable |
getTo()
The upper value in the range. |
java.lang.String |
inspect()
|
boolean |
isReverse()
Never true for an empty range. |
java.lang.Object |
remove(int index)
Always throws UnsupportedOperationException for an empty range. |
boolean |
remove(java.lang.Object o)
Always throws UnsupportedOperationException for an empty range. |
boolean |
removeAll(java.util.Collection c)
Always throws UnsupportedOperationException for an empty range. |
boolean |
retainAll(java.util.Collection c)
Always throws UnsupportedOperationException for an empty range. |
java.lang.Object |
set(int index,
java.lang.Object element)
Always throws UnsupportedOperationException for an empty range. |
int |
size()
Always 0 for an empty range. |
java.util.List |
step(int step)
Always returns an empty list for an empty range. |
void |
step(int step,
Closure closure)
Always does nothing for an empty range. |
java.lang.String |
toString()
|
| Methods inherited from class java.util.AbstractList |
|---|
add, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, subList, toArray, toArray |
| Field Detail |
|---|
protected java.lang.Comparable at
null).
| Constructor Detail |
|---|
public EmptyRange(java.lang.Comparable at)
EmptyRange.
at - the value at which the range starts (may be null).| Method Detail |
|---|
public java.lang.Comparable getFrom()
getFrom in interface Rangepublic java.lang.Comparable getTo()
getTo in interface Rangepublic boolean isReverse()
isReverse in interface Rangefalsepublic boolean containsWithinBounds(java.lang.Object o)
containsWithinBounds in interface Rangeo - the object to check against the boundaries of the range
falsepublic java.lang.String inspect()
inspect in interface RangeString representation of this Range as would be typed into a console
to create the Range instancepublic java.lang.String toString()
toString in class java.util.AbstractCollectionpublic int size()
size in interface java.util.Collectionsize in interface java.util.Listsize in class java.util.AbstractCollectionpublic java.lang.Object get(int index)
IndexOutOfBoundsException for an empty range.
get in interface java.util.Listget in class java.util.AbstractListjava.lang.IndexOutOfBoundsException - alwayspublic boolean add(java.lang.Object o)
UnsupportedOperationException for an empty range.
add in interface java.util.Collectionadd in interface java.util.Listadd in class java.util.AbstractListjava.lang.UnsupportedOperationException - always
public boolean addAll(int index,
java.util.Collection c)
UnsupportedOperationException for an empty range.
addAll in interface java.util.ListaddAll in class java.util.AbstractListjava.lang.UnsupportedOperationExceptionpublic boolean addAll(java.util.Collection c)
UnsupportedOperationException for an empty range.
addAll in interface java.util.CollectionaddAll in interface java.util.ListaddAll in class java.util.AbstractCollectionjava.lang.UnsupportedOperationExceptionpublic boolean remove(java.lang.Object o)
UnsupportedOperationException for an empty range.
remove in interface java.util.Collectionremove in interface java.util.Listremove in class java.util.AbstractCollectionjava.lang.UnsupportedOperationExceptionpublic java.lang.Object remove(int index)
UnsupportedOperationException for an empty range.
remove in interface java.util.Listremove in class java.util.AbstractListjava.lang.UnsupportedOperationExceptionpublic boolean removeAll(java.util.Collection c)
UnsupportedOperationException for an empty range.
removeAll in interface java.util.CollectionremoveAll in interface java.util.ListremoveAll in class java.util.AbstractCollectionjava.lang.UnsupportedOperationExceptionpublic boolean retainAll(java.util.Collection c)
UnsupportedOperationException for an empty range.
retainAll in interface java.util.CollectionretainAll in interface java.util.ListretainAll in class java.util.AbstractCollectionjava.lang.UnsupportedOperationException
public java.lang.Object set(int index,
java.lang.Object element)
UnsupportedOperationException for an empty range.
set in interface java.util.Listset in class java.util.AbstractListjava.lang.UnsupportedOperationException
public void step(int step,
Closure closure)
step in interface Rangestep - the amount by which to step. If negative, steps through the
range backwards.closure - the Closure to callpublic java.util.List step(int step)
step in interface Rangestep - the amount by which to step. If negative, steps through the
range backwards.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||