public class MergeableMetricBase
extends htsjdk.samtools.metrics.MetricBase
Modifier and Type | Class and Description |
---|---|
protected static interface |
MergeableMetricBase.MergeByAdding |
protected static interface |
MergeableMetricBase.MergeByAssertEquals |
protected static interface |
MergeableMetricBase.NoMergingIsDerived |
Constructor and Description |
---|
MergeableMetricBase() |
Modifier and Type | Method and Description |
---|---|
void |
calculateDerivedFields()
placeholder method that will calculate the derived fields from the other ones.
|
boolean |
canMerge(MergeableMetricBase other)
checks if this instance can be merged with another
Other must have all the fields that this instance has, and
the fields that are annotated as MergeByAssertEquals must contain the same value
|
void |
merge(MergeableMetricBase other)
Merge another metric into this one
|
boolean |
mergeIfCan(MergeableMetricBase other)
Merges another MergableMetricBase if possible
|
public boolean canMerge(MergeableMetricBase other)
other
- metric that will be merged into this one.public boolean mergeIfCan(MergeableMetricBase other)
other
- another MergableMetricBase instance to merge, must of the same class as this.public void merge(MergeableMetricBase other)
other
- metric to merge into this one.public void calculateDerivedFields()