org.omnaest.utils.structure.collection
Class CollectionAbstract<E>

java.lang.Object
  extended by org.omnaest.utils.structure.collection.CollectionAbstract<E>
Type Parameters:
E -
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>
Direct Known Subclasses:
CollectionComposite, CollectionToCollectionAdapterBase, ListAbstract, SetAbstract

public abstract class CollectionAbstract<E>
extends Object
implements Collection<E>, Serializable

Abstract implementation for the Collection interface. Only a few very needed methods are left to be implemented by derived classes.

Author:
Omnaest
See Also:
Serialized Form

Constructor Summary
CollectionAbstract()
           
 
Method Summary
 boolean addAll(Collection<? extends E> collection)
           
 void clear()
           
 boolean containsAll(Collection<?> collection)
           
 boolean equals(Object object)
           
 int hashCode()
           
 boolean isEmpty()
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
add, contains, iterator, remove, size
 

Constructor Detail

CollectionAbstract

public CollectionAbstract()
Method Detail

clear

public void clear()
Specified by:
clear in interface Collection<E>

addAll

public boolean addAll(Collection<? extends E> collection)
Specified by:
addAll in interface Collection<E>

containsAll

public boolean containsAll(Collection<?> collection)
Specified by:
containsAll in interface Collection<E>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>

toArray

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

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<E>

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<E>
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Specified by:
equals in interface Collection<E>
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.