dsto.dfc.collections
Class EmptyCollection

java.lang.Object
  extended by dsto.dfc.collections.EmptyCollection
All Implemented Interfaces:
Copyable, Singleton, Serializable, Cloneable, Iterable, Collection
Direct Known Subclasses:
EmptyMonitoredCollection

public class EmptyCollection
extends Object
implements Collection, Singleton, Copyable, Serializable

See Also:
Serialized Form

Field Summary
static EmptyCollection INSTANCE
           
 
Constructor Summary
protected EmptyCollection()
           
 
Method Summary
 boolean add(Object o)
           
 boolean addAll(Collection c)
           
 void clear()
           
 Object clone()
          Create a completely separate copy of this object and any mutable objects owned by the object.
 boolean contains(Object o)
           
 boolean containsAll(Collection c)
           
 boolean equals(Object o)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 boolean retainAll(Collection c)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] a)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
hashCode
 

Field Detail

INSTANCE

public static final EmptyCollection INSTANCE
Constructor Detail

EmptyCollection

protected EmptyCollection()
Method Detail

size

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

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection

iterator

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

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection

toArray

public Object[] toArray(Object[] a)
Specified by:
toArray in interface Collection

add

public boolean add(Object o)
Specified by:
add in interface Collection

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection

containsAll

public boolean containsAll(Collection c)
Specified by:
containsAll in interface Collection

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface Collection

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface Collection

retainAll

public boolean retainAll(Collection c)
Specified by:
retainAll in interface Collection

clear

public void clear()
Specified by:
clear in interface Collection

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection
Overrides:
equals in class Object

clone

public Object clone()
Description copied from interface: Copyable
Create a completely separate copy of this object and any mutable objects owned by the object.

NOTE: subclasses should not remove the CloneNotSupportedException throws clause if they themselves support subclassing: removing the CloneNotSupportedException declaration stops subclasses from indicating that a clone was not possible.

Specified by:
clone in interface Copyable
Overrides:
clone in class Object


Copyright © 2008 Commonwealth of Australia