public void sortFields() {
        final Comparator<TiffOutputField> comparator = (e1, e2) -> {
            if (e1.tag != e2.tag) {
                return e1.tag - e2.tag;
            }
            return e1.getSortHint() - e2.getSortHint();
        };
        fields.sort(comparator);
    }
Finds the TiffOutputField for the given TagInfo from this TiffOutputDirectory.

<p>
If there is no field matching the given TagInfo, null will be returned.
</p>

@param tagInfo the TagInfo specifying the field
@return the field matching tagInfo or null, if the field isn't present
@see #findField(int)
src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java