private long findSegmentSplitsMerges ( List < StreamSegmentRecord > referenceSegmentsList , List < StreamSegmentRecord > targetSegmentsList ) { return referenceSegmentsList . stream ( ) . filter ( segment -> targetSegmentsList . stream ( ) . filter ( target -> target . overlaps ( segment ) ) . count ( ) > 1 ) . count ( ) ; }
Method to calculate number of splits and merges .