public void merge ( Mutation < E , K > m ) { Preconditions . checkNotNull ( m ) ; if ( null != m . additions ) { if ( null == additions ) additions = m . additions ; else additions . addAll ( m . additions ) ; } if ( null != m . deletions ) { if ( null == deletions ) deletions = m . deletions ; else deletions . addAll ( m . deletions ) ; } }
Merges another mutation into this mutation . Ensures that all additions and deletions are added to this mutation . Does not remove duplicates if such exist - this needs to be ensured by the caller .