01: package nl.knowlogy.validation.jsf.utils;
02:
03: import java.util.Iterator;
04: import java.util.NoSuchElementException;
05:
06: public final class NullIterator implements Iterator {
07:
08: public NullIterator() {
09: }
10:
11: public static final Iterator instance() {
12: return INSTANCE;
13: }
14:
15: public boolean hasNext() {
16: return false;
17: }
18:
19: public Object next() {
20: throw new NoSuchElementException();
21: }
22:
23: public void remove() {
24: throw new UnsupportedOperationException(getClass().getName()
25: + " UnsupportedOperationException");
26: }
27:
28: private static final NullIterator INSTANCE = new NullIterator();
29:
30: }
|