KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > util > EmptyIterator


1 //$Id: EmptyIterator.java,v 1.1 2004/06/03 16:31:30 steveebersole Exp $
2
package org.hibernate.util;
3
4 import java.util.Iterator JavaDoc;
5
6 /**
7  * @author Gavin King
8  */

9 public final class EmptyIterator implements Iterator JavaDoc {
10
11     public static final Iterator JavaDoc INSTANCE = new EmptyIterator();
12
13     public boolean hasNext() {
14         return false;
15     }
16
17     public Object JavaDoc next() {
18         throw new UnsupportedOperationException JavaDoc();
19     }
20
21     public void remove() {
22         throw new UnsupportedOperationException JavaDoc();
23     }
24
25     private EmptyIterator() {}
26
27 }
28
Popular Tags