boolean attachmentsAreStructurallyDifferent ( List < AttachmentModel > firstAttachments , List < AttachmentModel > otherAttachments ) { if ( firstAttachments . size ( ) != otherAttachments . size ( ) ) { return true ; } for ( int i = 0 ; i < firstAttachments . size ( ) ; i ++ ) { if ( attachmentIsStructurallyDifferent ( firstAttachments . get ( i ) , otherAttachments . get ( i ) ) ) { return true ; } } return false ; }
Attachments are only structurally different if one step has an inline attachment and the other step either has no inline attachment or the inline attachment is different .