Class SummarizerSplitMoreThan<T>
- Type Parameters:
T- type of element to be summarized
Multiplexes between two summarizers depending on the total number of count.
If the count is greater than a threshold, one summarizer is used, if not another.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a element to the summary.describe()A string summarizing this item.intIf there are more thancountThresholdelements, usesummarizerGreaterThan, elsesummarizerElse.Used for summary ifcount(elements) <= countThresholdUsed for summary ifcount(elements) > countThresholdbooleanWhether aImageMetadataInputis required as an input.voidsetCountThreshold(int countThreshold) If there are more thancountThresholdelements, usesummarizerGreaterThan, elsesummarizerElse.voidsetSummarizerElse(Summarizer<T> summarizerElse) Used for summary ifcount(elements) <= countThresholdvoidsetSummarizerGreaterThan(Summarizer<T> summarizerGreaterThan) Used for summary ifcount(elements) > countThresholdMethods inherited from class org.anchoranalysis.plugin.io.bean.summarizer.Summarizer
addAllMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
SummarizerSplitMoreThan
public SummarizerSplitMoreThan()
-
-
Method Details
-
add
Description copied from class:SummarizerAdds a element to the summary.- Specified by:
addin classSummarizer<T>- Parameters:
element- the element to add.- Throws:
OperationFailedException
-
describe
Description copied from class:SummarizerA string summarizing this item.- Specified by:
describein classSummarizer<T>- Returns:
- the description.
- Throws:
OperationFailedException
-
requiresImageMetadata
Description copied from class:SummarizerWhether aImageMetadataInputis required as an input.- Specified by:
requiresImageMetadatain classSummarizer<T>- Returns:
- true if the summarize requires
ImageMetadataInputas input, or false if any input is acceptable. - Throws:
OperationFailedException- if this cannot be established.
-
getCountThreshold
public int getCountThreshold()If there are more thancountThresholdelements, usesummarizerGreaterThan, elsesummarizerElse. -
setCountThreshold
public void setCountThreshold(int countThreshold) If there are more thancountThresholdelements, usesummarizerGreaterThan, elsesummarizerElse. -
getSummarizerGreaterThan
Used for summary ifcount(elements) > countThreshold -
setSummarizerGreaterThan
Used for summary ifcount(elements) > countThreshold -
getSummarizerElse
Used for summary ifcount(elements) <= countThreshold -
setSummarizerElse
Used for summary ifcount(elements) <= countThreshold
-