Class ImageCounterList<T extends Assignment<ObjectMask>>

Object
ImageCounterList<T>
Type Parameters:
T - the payload-type of each ImageCounter.
All Implemented Interfaces:
Iterable<ImageCounter<T>>, ImageCounter<T>

public class ImageCounterList<T extends Assignment<ObjectMask>> extends Object implements Iterable<ImageCounter<T>>, ImageCounter<T>
Allows operations to be applied to several ImageCounters collectively.
Author:
Owen Feehan
  • Constructor Details

    • ImageCounterList

      public ImageCounterList()
  • Method Details

    • add

      public boolean add(ImageCounter<T> e)
      Adds an ImageCounter to the list.
      Parameters:
      e - the ImageCounter to add.
      Returns:
      true if the counter was added successfully, false otherwise.
    • addAll

      public <S extends ImageCounter<T>> boolean addAll(Collection<S> e)
      Adds a collection of ImageCounters to the list.
      Type Parameters:
      S - the type of ImageCounters in the collection.
      Parameters:
      e - the collection of ImageCounters to add.
      Returns:
      true if the collection was added successfully, false otherwise.
    • addUnannotatedImage

      public void addUnannotatedImage()
      Description copied from interface: ImageCounter
      Add an image that did not have an associated annotation.
      Specified by:
      addUnannotatedImage in interface ImageCounter<T extends Assignment<ObjectMask>>
    • addAnnotatedImage

      public void addAnnotatedImage(T payload)
      Description copied from interface: ImageCounter
      Add an image that had an associated annotation.
      Specified by:
      addAnnotatedImage in interface ImageCounter<T extends Assignment<ObjectMask>>
      Parameters:
      payload - the payload associated with the annotated image.
    • iterator

      public Iterator<ImageCounter<T>> iterator()
      Specified by:
      iterator in interface Iterable<T extends Assignment<ObjectMask>>
    • stream

      public Stream<ImageCounter<T>> stream()
      Returns a sequential Stream with this list as its source.
      Returns:
      a sequential Stream over the elements in this list.