|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList groovy.lang.EmptyRange
public class EmptyRange extends AbstractList
Constructing Ranges like 0..<0
Field Summary | |
---|---|
protected Comparable |
at
The value at which the range originates (may be |
Constructor Summary | |
EmptyRange(Comparable at)
Creates a new EmptyRange. |
Method Summary | |
---|---|
boolean
|
add(Object o)
Always throws |
boolean
|
addAll(int index, Collection c)
Always throws |
boolean
|
addAll(Collection c)
Always throws |
boolean
|
containsWithinBounds(Object o)
Never true for an empty range. |
Object
|
get(int index)
Always throws |
Comparable
|
getFrom()
{@inheritDoc} |
Comparable
|
getTo()
{@inheritDoc} |
String
|
inspect()
{@inheritDoc} |
boolean
|
isReverse()
Never true for an empty range. |
boolean
|
remove(Object o)
Always throws |
Object
|
remove(int index)
Always throws |
boolean
|
removeAll(Collection c)
Always throws |
boolean
|
retainAll(Collection c)
Always throws |
Object
|
set(int index, Object element)
Always throws |
int
|
size()
Always 0 for an empty range. |
void
|
step(int step, Closure closure)
Always does nothing for an empty range. |
List
|
step(int step)
Always returns an empty list for an empty range. |
String
|
toString()
{@inheritDoc} |
Methods inherited from class AbstractList | |
---|---|
add, add, remove, get, equals, hashCode, indexOf, clear, lastIndexOf, subList, addAll, iterator, set, listIterator, listIterator, remove, toString, contains, isEmpty, size, toArray, toArray, addAll, retainAll, containsAll, removeAll, wait, wait, wait, getClass, notify, notifyAll, size |
Methods inherited from class AbstractCollection | |
---|---|
add, remove, toString, clear, contains, isEmpty, size, toArray, toArray, addAll, iterator, retainAll, containsAll, removeAll, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
protected Comparable at
null
).
Constructor Detail |
---|
public EmptyRange(Comparable at)
at
- the value at which the range starts (may be null
).
Method Detail |
---|
public boolean add(Object o)
UnsupportedOperationException
for an empty range.
public boolean addAll(int index, Collection c)
UnsupportedOperationException
for an empty range.
public boolean addAll(Collection c)
UnsupportedOperationException
for an empty range.
public boolean containsWithinBounds(Object o)
false
public Object get(int index)
IndexOutOfBoundsException
for an empty range.
public Comparable getFrom()
public Comparable getTo()
public String inspect()
public boolean isReverse()
false
public boolean remove(Object o)
UnsupportedOperationException
for an empty range.
public Object remove(int index)
UnsupportedOperationException
for an empty range.
public boolean removeAll(Collection c)
UnsupportedOperationException
for an empty range.
public boolean retainAll(Collection c)
UnsupportedOperationException
for an empty range.
public Object set(int index, Object element)
UnsupportedOperationException
for an empty range.
public int size()
public void step(int step, Closure closure)
public List step(int step)
public String toString()
Copyright © 2003-2013 The Codehaus. All rights reserved.