com.jeta.open.support
Class EmptyCollection
java.lang.Object
java.util.AbstractCollection
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.
Methods inherited from class java.util.AbstractCollection |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
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.