Plexus v0.13.1

com.phoenixst.collections
Class LoggingCollection

java.lang.Object
  extended by com.phoenixst.collections.LoggingCollection
All Implemented Interfaces:
Iterable, Collection

public class LoggingCollection
extends Object
implements Collection

A Collection which wraps another to provide logging support.

Since:
1.0
Version:
$Revision: 1.10 $
Author:
Ray A. Conner

Constructor Summary
LoggingCollection(Collection delegate)
          Creates a new LoggingCollection which logs to a category corresponding to this class at the DEBUG level.
LoggingCollection(Collection delegate, org.apache.log4j.Logger logger)
          Creates a new LoggingCollection which uses the specified log at the DEBUG level.
LoggingCollection(Collection delegate, org.apache.log4j.Logger logger, org.apache.log4j.Level level)
          Creates a new LoggingCollection.
 
Method Summary
 boolean add(Object object)
           
 boolean addAll(Collection collection)
           
 void clear()
           
 boolean contains(Object object)
           
 boolean containsAll(Collection collection)
           
protected  Collection getDelegate()
          Provides access to internal state so it can be used by extensions of this class.
protected  org.apache.log4j.Level getLevel()
          Provides access to internal state so it can be used by extensions of this class.
protected  org.apache.log4j.Logger getLogger()
          Provides access to internal state so it can be used by extensions of this class.
 boolean isEmpty()
           
 Iterator iterator()
           
 boolean remove(Object object)
           
 boolean removeAll(Collection collection)
           
 boolean retainAll(Collection collection)
           
 int size()
           
 Object[] toArray()
           
 Object[] toArray(Object[] array)
           
 String 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
 

Constructor Detail

LoggingCollection

public LoggingCollection(Collection delegate)
Creates a new LoggingCollection which logs to a category corresponding to this class at the DEBUG level.


LoggingCollection

public LoggingCollection(Collection delegate,
                         org.apache.log4j.Logger logger)
Creates a new LoggingCollection which uses the specified log at the DEBUG level.


LoggingCollection

public LoggingCollection(Collection delegate,
                         org.apache.log4j.Logger logger,
                         org.apache.log4j.Level level)
Creates a new LoggingCollection.

Method Detail

getDelegate

protected final Collection getDelegate()
Provides access to internal state so it can be used by extensions of this class.


getLogger

protected final org.apache.log4j.Logger getLogger()
Provides access to internal state so it can be used by extensions of this class.


getLevel

protected final org.apache.log4j.Level getLevel()
Provides access to internal state so it can be used by extensions of this class.


size

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

isEmpty

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

clear

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

add

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

remove

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

contains

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

iterator

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

addAll

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

containsAll

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

removeAll

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

retainAll

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

toArray

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

toArray

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

toString

public String toString()
Overrides:
toString in class Object

Plexus v0.13.1

See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.