public static Set < String > mergeMVFieldValues ( Collection < String > currValueSet , Collection < String > removeValueSet , Collection < String > newValueSet ) { Set < String > resultSet = new HashSet <> ( ) ; if ( currValueSet != null ) { resultSet . addAll ( currValueSet ) ; } if ( removeValueSet != null ) { resultSet . removeAll ( removeValueSet ) ; } if ( newValueSet != null ) { resultSet . addAll ( newValueSet ) ; } return resultSet ; }
Merge the given current remove and new MV field values into a new set .