|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dtfj.analyzer.util.DTFJIterator
public class DTFJIterator
This class is intended to simplify the handling of the Iterators returned by the various DTFJ interfaces. Since they can at any point return an instance of CorruptData we need to handle that case and avoid returning those corrupt objects back to the invoking code.
Field Summary | |
---|---|
protected IAnalyzerContext |
context
|
static int |
DEFAULT_LIMIT
Define the maximum number of corrupt data objects or nulls we will handle from a given iterator. |
protected java.util.Iterator |
rawIterator
|
Constructor Summary | |
---|---|
DTFJIterator(java.util.Iterator it)
A 'safe' iterator which has the same semantics as the underlying iterator but handles CorruptData objects and nulls differently. |
|
DTFJIterator(java.util.Iterator it,
IAnalyzerContext ctx)
A 'safe' iterator which has the same semantics as the underlying iterator but handles CorruptData objects and nulls differently. |
Method Summary | |
---|---|
int |
getCorruptObjectCount()
Count the total number of CorruptData objects that have been seen so far. |
int |
getNullCount()
Count the total number of nulls that have been seen so far. |
protected boolean |
handleMoreCorruptObjects(java.lang.Object obj)
|
protected boolean |
handleMoreNulls(java.lang.Object obj)
|
boolean |
hasNext()
(non-Javadoc) |
java.lang.Object |
next()
(non-Javadoc) |
void |
remove()
(non-Javadoc) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_LIMIT
protected java.util.Iterator rawIterator
protected IAnalyzerContext context
Constructor Detail |
---|
public DTFJIterator(java.util.Iterator it, IAnalyzerContext ctx)
it
- the iterator that we are going to wrapctx
- the current analyzer contextpublic DTFJIterator(java.util.Iterator it)
it
- the iterator that we are going to wrapMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
Iterator.hasNext()
public java.lang.Object next()
next
in interface java.util.Iterator
Iterator.next()
public void remove()
remove
in interface java.util.Iterator
Iterator.remove()
public int getCorruptObjectCount()
public int getNullCount()
protected boolean handleMoreCorruptObjects(java.lang.Object obj)
protected boolean handleMoreNulls(java.lang.Object obj)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |