net.cscott.jutil

Class CollectionWrapper<E>

public class CollectionWrapper<E> extends Object implements Collection<E>

CollectionWrapper is a class that acts as a wrapper around another Collection, using it as its backing store. This class isn't meant for direct usage, but rather provides for an easy way for developers to quickly add extra independent behavior to their own specific Collections without having to reimplement all of AbstractCollection's interface

Version: $Id: CollectionWrapper.java,v 1.2 2004/01/13 20:47:05 cananian Exp $

Author: Felix S. Klock II

Field Summary
protected Collection<E>b
Collection backing this.
Constructor Summary
CollectionWrapper(Collection<E> c)
Creates a CollectionWrapper.
Method Summary
booleanadd(E o)
booleanaddAll(Collection<? extends E> c)
voidclear()
booleancontains(Object o)
booleancontainsAll(Collection<?> c)
booleanequals(Object o)
inthashCode()
booleanisEmpty()
Iterator<E>iterator()
booleanremove(Object o)
booleanremoveAll(Collection<?> c)
booleanretainAll(Collection<?> c)
intsize()
Object[]toArray()
<T> T[]toArray(T[] a)
StringtoString()

Field Detail

b

protected final Collection<E> b
Collection backing this.

Constructor Detail

CollectionWrapper

public CollectionWrapper(Collection<E> c)
Creates a CollectionWrapper.

Method Detail

add

public boolean add(E o)

addAll

public boolean addAll(Collection<? extends E> c)

clear

public void clear()

contains

public boolean contains(Object o)

containsAll

public boolean containsAll(Collection<?> c)

equals

public boolean equals(Object o)

hashCode

public int hashCode()

isEmpty

public boolean isEmpty()

iterator

public Iterator<E> iterator()

remove

public boolean remove(Object o)

removeAll

public boolean removeAll(Collection<?> c)

retainAll

public boolean retainAll(Collection<?> c)

size

public int size()

toArray

public Object[] toArray()

toArray

public <T> T[] toArray(T[] a)

toString

public String toString()
Copyright © 2003 C. Scott Ananian