Here you can find the source of getSymmetricPropertyValueDifference( Properties propertyFileOne, Properties propertyFileTwo)
public static Map<String, SimpleEntry<String, String>> getSymmetricPropertyValueDifference( Properties propertyFileOne, Properties propertyFileTwo)
//package com.java2s; /*/*from ww w . j a v a2 s . c om*/ * Inspired by the Commons Collections package created by Apache * http://commons.apache.org/collections/ * http://www.apache.org/licenses/LICENSE-2.0 */ import java.util.*; import static java.util.AbstractMap.*; public class Main { public static Map<String, SimpleEntry<String, String>> getSymmetricPropertyValueDifference( Properties propertyFileOne, Properties propertyFileTwo) { Map<String, SimpleEntry<String, String>> differences = new HashMap<String, SimpleEntry<String, String>>(); for (String key : propertyFileOne.stringPropertyNames()) { String propertyOneValue = propertyFileOne.getProperty(key); String propertyTwoValue = propertyFileTwo.getProperty(key); if (propertyOneValue != null && propertyTwoValue != null && !propertyOneValue.equals(propertyTwoValue)) { differences.put(key, new SimpleEntry(propertyOneValue, propertyTwoValue)); } } return differences; } }