Class Summarizer<T>

Object
AnchorBean<Summarizer<T>>
Summarizer<T>
Type Parameters:
T - type of element to be summarized
Direct Known Subclasses:
SummarizerAggregate, SummarizerCount, SummarizerImageMetadata, SummarizerInputFromManager, SummarizerListMultiline, SummarizerPath, SummarizerSplitMoreThan

public abstract class Summarizer<T> extends AnchorBean<Summarizer<T>>
Summarizes a set of elements by outputting a descriptive string.
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    add(T element)
    Adds a element to the summary.
    void
    addAll(Collection<T> elements)
    Adds the elements to the summary.
    abstract String
    A string summarizing this item.
    abstract boolean
    Whether a ImageMetadataInput is required as an input.

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Summarizer

      public Summarizer()
  • Method Details

    • addAll

      public void addAll(Collection<T> elements) throws OperationFailedException
      Adds the elements to the summary.
      Parameters:
      elements - the elements to add.
      Throws:
      OperationFailedException
    • add

      public abstract void add(T element) throws OperationFailedException
      Adds a element to the summary.
      Parameters:
      element - the element to add.
      Throws:
      OperationFailedException
    • describe

      public abstract String describe() throws OperationFailedException
      A string summarizing this item.
      Returns:
      the description.
      Throws:
      OperationFailedException
    • requiresImageMetadata

      public abstract boolean requiresImageMetadata() throws OperationFailedException
      Whether a ImageMetadataInput is required as an input.
      Returns:
      true if the summarize requires ImageMetadataInput as input, or false if any input is acceptable.
      Throws:
      OperationFailedException - if this cannot be established.