Plexus v0.13.1

com.phoenixst.collections
Class LoggingIterator

java.lang.Object
  extended by com.phoenixst.collections.LoggingIterator
All Implemented Interfaces:
Iterator
Direct Known Subclasses:
LoggingTraverser

public class LoggingIterator
extends Object
implements Iterator

An Iterator which wraps another to provide logging support.

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

Constructor Summary
LoggingIterator(Iterator delegate)
          Creates a new LoggingIterator which logs to a category corresponding to this class at the DEBUG level.
LoggingIterator(Iterator delegate, org.apache.log4j.Logger logger)
          Creates a new LoggingIterator which uses the specified log at the DEBUG level.
LoggingIterator(Iterator delegate, org.apache.log4j.Logger logger, org.apache.log4j.Level level)
          Creates a new LoggingIterator.
 
Method Summary
protected  Iterator 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 hasNext()
           
 Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingIterator

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


LoggingIterator

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


LoggingIterator

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

Method Detail

getDelegate

protected final Iterator 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.


hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

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.