public class Striterator extends Object implements IStriterator, IStriterator.ITailOp, ICloseableIterator
Iterator
s.
Allows wrapping of an iterator so that extensions may add type specific
next
The IFilter objects passed to addFilter allow selection criteria for
the iterated objects. The addTypeFilter method allows easy
specification of a class type restriction.
IStriterator.ITailOp| Constructor and Description |
|---|
Striterator()
Deserialization constructor.
|
Striterator(Enumeration src) |
Striterator(Iterator src)
Constructor takes source iterator
|
Striterator(Iterator src,
List<IFilter> filters) |
| Modifier and Type | Method and Description |
|---|---|
IStriterator |
addFilter(IFilter filter)
creates a Filterator to apply the filter
|
IStriterator |
addInstanceOfFilter(Class cls)
check each object against cls.isInstance(object)
|
IStriterator |
addTypeFilter(Class cls)
check each object against cls.isInstance(object)
|
IStriterator |
append(Iterator iter)
append the iteration
|
Iterator |
availableTailOp()
If this Striterator has not been overriden then return the
source iterator, or even better, try and recurse to the nested tailOp
if available.
|
void |
close()
The base close implementation ends the iteration with no other side-effects.
|
void |
compile(Iterator src) |
void |
compile(Iterator src,
Object context) |
IStriterator |
exclude(Object object)
exclude the object from the iteration
|
boolean |
hasMoreElements()
Enumeration version of hasNext()
|
boolean |
hasNext()
delegates hasNext request to source iterator
|
IStriterator |
makeUnique()
exclude the object from the iteration
|
IStriterator |
map(Object client,
Method method)
map the clients method against the Iteration, the Method MUST take a single Object valued parameter
|
Object |
next()
delegates next request to source iterator
|
Object |
nextElement()
Enumeration version of next()
|
void |
remove()
delegates remove request to source iterator
|
String |
toString()
Human readable representation of the filter chain.
|
public Striterator()
public Striterator(Iterator src)
public Striterator(Enumeration src)
public boolean hasNext()
public Object next()
public boolean hasMoreElements()
hasMoreElements in interface Enumerationpublic Object nextElement()
nextElement in interface Enumerationpublic void remove()
public IStriterator addFilter(IFilter filter)
addFilter in interface IStriteratorpublic void compile(Iterator src)
public IStriterator addTypeFilter(Class cls)
addTypeFilter in interface IStriteratorpublic IStriterator addInstanceOfFilter(Class cls)
addInstanceOfFilter in interface IStriteratorpublic IStriterator exclude(Object object)
exclude in interface IStriteratorpublic IStriterator makeUnique()
makeUnique in interface IStriteratorpublic IStriterator append(Iterator iter)
append in interface IStriteratorpublic IStriterator map(Object client, Method method)
map in interface IStriteratorpublic String toString()
public Iterator availableTailOp()
availableTailOp in interface IStriterator.ITailOppublic void close()
close in interface ICloseableclose in interface ICloseableIteratorCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.