class MinMerger extends AbstractElementMerger {

    @Override
    public void mergeNodes(List<Node> fromParents, Element toParent, Document toDocument) throws PDUStitchingException {
        double minValue = Double.POSITIVE_INFINITY;
        for (Node fromParent : fromParents) {
            final double value = Double.parseDouble(fromParent.getTextContent());
            minValue = Math.min(minValue, value);
        }
        addTextToNode(toParent, "" + minValue, toDocument);
    }

}