Class SearchObjectAggregator
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.findreplace.SearchObjectCursor
-
- com.inductiveautomation.ignition.designer.findreplace.SearchObjectAggregator
-
- All Implemented Interfaces:
java.util.Iterator<SearchObject>
public class SearchObjectAggregator extends SearchObjectCursor implements java.util.Iterator<SearchObject>
An implementation of Iterator<SearchObject> that aggregates multiple SearchObjectCursor objects. This class deals with the idea that a SearchObjectCursor will return either a SearchObject directly or in some cases, another SearchObjectCursor.
The SearchObjectAggregator can optionally be given a
TaskProgressListener
, which it will monitor for cancellation, so that the individual cursors don't need to worry about task cancellation.
-
-
Constructor Summary
Constructors Constructor Description SearchObjectAggregator()
SearchObjectAggregator(TaskProgressListener progress)
SearchObjectAggregator(TaskProgressListener progress, SearchObjectCursor... cursors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SearchObject object)
void
add(SearchObjectCursor cursor)
boolean
hasNext()
SearchObject
next()
Gets the next search object, which might be a SearchObject or a SearchObjectCursor.protected void
onFinished()
Override this to be notified when this iterator has been exhaustedvoid
remove()
-
Methods inherited from class com.inductiveautomation.ignition.designer.findreplace.SearchObjectCursor
of
-
-
-
-
Constructor Detail
-
SearchObjectAggregator
public SearchObjectAggregator()
-
SearchObjectAggregator
public SearchObjectAggregator(TaskProgressListener progress)
-
SearchObjectAggregator
public SearchObjectAggregator(TaskProgressListener progress, SearchObjectCursor... cursors)
-
-
Method Detail
-
add
public void add(SearchObject object)
-
add
public void add(SearchObjectCursor cursor)
-
onFinished
protected void onFinished()
Override this to be notified when this iterator has been exhausted
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<SearchObject>
-
next
public SearchObject next()
Description copied from class:SearchObjectCursor
Gets the next search object, which might be a SearchObject or a SearchObjectCursor. Null is returned at the end of the stream to signify that the cursor is exhausted.- Specified by:
next
in interfacejava.util.Iterator<SearchObject>
- Specified by:
next
in classSearchObjectCursor
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<SearchObject>
-
-