com.jeta.open.support
Class EmptyCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by com.jeta.open.support.EmptyCollection
All Implemented Interfaces:
Iterable, Collection

public class EmptyCollection
extends AbstractCollection

This class is used to implement an unmodifiable collection. Any caller can get an instance of this collection (a singleton) when they need to return an empty unmodifiable collection.


Method Summary
static Collection getInstance()
           
 Iterator iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Method Detail

getInstance

public static Collection getInstance()

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in class AbstractCollection

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in class AbstractCollection


Copyright © 2005-2007 Jeff Tassin & Todd Viegut. All Rights Reserved.