Package com.redwood.scheduler.api.model
Class ChildApplicationObjectIterator
- java.lang.Object
-
- com.redwood.scheduler.infrastructure.collections.IteratorConcatenator<ApplicationObject>
-
- com.redwood.scheduler.api.model.ChildApplicationObjectIterator
-
- All Implemented Interfaces:
Iterator<ApplicationObject>
public class ChildApplicationObjectIterator extends com.redwood.scheduler.infrastructure.collections.IteratorConcatenator<ApplicationObject>
Small helper class for retrieving all ApplicationObject instances that belong to a particular application.
-
-
Constructor Summary
Constructors Constructor Description ChildApplicationObjectIterator(Application application, boolean includeBranchedDefinitions)
Construct an iterator over the child objects of an application.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterator<ApplicationObject>
getApplicationAndDescendents(Application application, boolean includeBranchedDefinitions)
Return an iterator over this application and all descendants in the application hierarchy.static Iterator<ApplicationObject>[]
getChildApplicationObjectIterators(Application application, boolean includeBranchedDefinitions)
Retrieve an array of iterators for the child objects of an application.-
Methods inherited from class com.redwood.scheduler.infrastructure.collections.IteratorConcatenator
hasNext, next, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
ChildApplicationObjectIterator
public ChildApplicationObjectIterator(Application application, boolean includeBranchedDefinitions)
Construct an iterator over the child objects of an application.- Parameters:
application
- the application whose children should be enumerated.includeBranchedDefinitions
- Iftrue
, all children should be enumerated whereas iffalse
then for types that can be branched (BranchedUniqueNamedApplicationObject
) only master versions should be included.
-
-
Method Detail
-
getChildApplicationObjectIterators
public static Iterator<ApplicationObject>[] getChildApplicationObjectIterators(Application application, boolean includeBranchedDefinitions)
Retrieve an array of iterators for the child objects of an application. Each element in the returned array is an iterator over a different type ofApplicationObject
.- Parameters:
application
- the application whose children should be enumerated.includeBranchedDefinitions
- Iftrue
, all children should be enumerated whereas iffalse
then for types that can be branched (BranchedUniqueNamedApplicationObject
) only master versions should be included.- Returns:
- an array of iterators that enumerate the application's children.
-
getApplicationAndDescendents
public static Iterator<ApplicationObject> getApplicationAndDescendents(Application application, boolean includeBranchedDefinitions)
Return an iterator over this application and all descendants in the application hierarchy.- Parameters:
application
- the application whose children should be enumerated.includeBranchedDefinitions
- Iftrue
, all children should be enumerated whereas iffalse
then for types that can be branched (BranchedUniqueNamedApplicationObject
) only master versions should be included.- Returns:
- an iterator over the application and all descendants.
-
-