default Optional<Long> getTotalLines() {
        return Optional.ofNullable(getDataRange())
                .filter(dataRange -> dataRange.getOptLocationFrom().isPresent()
                        && dataRange.getOptLocationTo().isPresent())
                .map(dataRange -> dataRange.getLocationTo().getLineNo()
                        - dataRange.getLocationFrom().getLineNo()
                        + 1L); // line nos are inclusive, so add 1
    }
@return The total number of lines if known
stroom-util-shared/src/main/java/stroom/util/shared/HasCharacterData.java