root / branches / v2_0_0_prep / libraries / libExceptions / src / org / gvsig / exceptions / BaseExceptionIterator.java @ 23150
History | View | Annotate | Download (846 Bytes)
1 |
package org.gvsig.exceptions; |
---|---|
2 |
|
3 |
import java.util.Iterator; |
4 |
|
5 |
/**
|
6 |
* @deprecated @see org.gvsig.tools.exception.BaseExceptionIterator
|
7 |
*/
|
8 |
class BaseExceptionIterator implements Iterator { |
9 |
|
10 |
Exception exception;
|
11 |
|
12 |
BaseExceptionIterator(BaseException exception){ |
13 |
this.exception = exception;
|
14 |
} |
15 |
/**
|
16 |
* @return true if the iteration has more elements.
|
17 |
*/
|
18 |
public boolean hasNext() { |
19 |
return this.exception != null; |
20 |
} |
21 |
|
22 |
/**
|
23 |
* @return The next element in the iteration.
|
24 |
*/
|
25 |
public Object next() { |
26 |
Exception exception;
|
27 |
exception = this.exception;
|
28 |
this.exception = (Exception) exception.getCause(); |
29 |
return exception;
|
30 |
} |
31 |
|
32 |
/**
|
33 |
* @throws "UnsupportedOperationException" because
|
34 |
* the remove operation will not be supported
|
35 |
* by this Iterator.
|
36 |
*/
|
37 |
public void remove() { |
38 |
throw new UnsupportedOperationException(); |
39 |
} |
40 |
} |