Class 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 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 of PartitionableObject.
        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