protected Properties difference ( final Map map ) { final Properties difference = new Properties ( ) ; for ( final Object o : map . entrySet ( ) ) { final Map . Entry entry = ( Map . Entry ) o ; final String key = ( String ) entry . getKey ( ) ; final String val = ( String ) entry . getValue ( ) ; if ( ! properties . containsKey ( key ) ) { difference . setProperty ( key , val ) ; } } return difference ; }
Reads map of input properties and returns a collection of those that are unique to that input set .