question: protected static void addVolume ( List < BlockObjectRestRep > blockObjects , VolumeRestRep volume , List < BlockSnapshotRestRep > snapshots ) { blockObjects . add ( volume ) ; if ( CollectionUtils . isNotEmpty ( snapshots ) ) { Iterator < BlockSnapshotRestRep > snapshotIter = snapshots . iterator ( ) ; while ( snapshotIter . hasNext ( ) ) { BlockSnapshotRestRep snap = snapshotIter . next ( ) ; if ( ResourceUtils . idEquals ( snap . getParent ( ) , volume ) ) { blockObjects . add ( snap ) ; snapshotIter . remove ( ) ; } } } }
target:  Add the volume and its snapshots to the 'blockObjects' list. When the method completes the snapshots that have been added to the blockObjects list will be removed from the snapshots list.