Package com.redwood.scheduler.api.model
Class PartitionObjectIterator
- java.lang.Object
-
- com.redwood.scheduler.infrastructure.collections.IteratorConcatenator<PartitionableObject>
-
- com.redwood.scheduler.api.model.PartitionObjectIterator
-
- All Implemented Interfaces:
Iterator<PartitionableObject>
public class PartitionObjectIterator extends com.redwood.scheduler.infrastructure.collections.IteratorConcatenator<PartitionableObject>
Small helper class for retrieving all PartitionObject instances that belong to a particular Partition.
-
-
Constructor Summary
Constructors Constructor Description PartitionObjectIterator(Partition partition)
Construct an iterator over the objects within a partition.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterator<PartitionableObject>[]
getPartitionObjectIterators(Partition partition)
Retrieve an array of iterators for the objects of an partition.static Iterator<PartitionableObject>
getPartitionObjects(Partition partition)
Return an iterator over this partition and all it objects.-
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
-
PartitionObjectIterator
public PartitionObjectIterator(Partition partition)
Construct an iterator over the objects within a partition.- Parameters:
partition
- the partition whose objects should be enumerated.
-
-
Method Detail
-
getPartitionObjectIterators
public static Iterator<PartitionableObject>[] getPartitionObjectIterators(Partition partition)
Retrieve an array of iterators for the objects of an partition. Each element in the returned array is an iterator over a different type ofPartitionableObject
.- Parameters:
partition
- the partition whose objects should be enumerated.- Returns:
- an array of iterators that enumerate the partitions's objects.
-
getPartitionObjects
public static Iterator<PartitionableObject> getPartitionObjects(Partition partition)
Return an iterator over this partition and all it objects.- Parameters:
partition
- the partition whose objects should be enumerated.- Returns:
- an iterator over the partitions objects
-
-