add Serializable to util classes
[sbp.git] / src / edu / berkeley / sbp / util / EmptyIterator.java
1 // Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
2
3 package edu.berkeley.sbp.util;
4 import java.util.*;
5 import java.io.*;
6
7 public final class EmptyIterator<T> implements Iterable<T>, Iterator<T>, Serializable {
8     public void        remove()   { throw new Error(); }
9     public boolean     hasNext()  { return false; }
10     public T           next()     { throw new Error(); }
11     public Iterator<T> iterator() { return this; }
12 }