|
|||||
| FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
Constructing Ranges like 0..<0
| Field Summary | |
|---|---|
Comparable |
at
|
| Constructor Summary | |
EmptyRange(Comparable at)
|
|
| Method Summary | |
|---|---|
boolean |
add(Object o)
Always throws UnsupportedOperationException for an empty range.
|
boolean |
addAll(int index, Collection c)
Always throws UnsupportedOperationException for an empty range.
|
boolean |
addAll(Collection c)
Always throws UnsupportedOperationException for an empty range.
|
boolean |
containsWithinBounds(Object o)
Never true for an empty range. |
Object |
get(int index)
Always throws IndexOutOfBoundsException for an empty range.
|
Comparable |
getFrom()
|
Comparable |
getTo()
|
String |
inspect()
|
boolean |
isReverse()
Never true for an empty range. |
boolean |
remove(Object o)
Always throws UnsupportedOperationException for an empty range.
|
Object |
remove(int index)
Always throws UnsupportedOperationException for an empty range.
|
boolean |
removeAll(Collection c)
Always throws UnsupportedOperationException for an empty range.
|
boolean |
retainAll(Collection c)
Always throws UnsupportedOperationException for an empty range.
|
Object |
set(int index, Object element)
Always throws UnsupportedOperationException for an empty range.
|
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()
|
| Constructor Detail |
|---|
public EmptyRange(Comparable at)
| 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()