public static Properties collapse(Properties props){
  Properties result;
  Enumeration<String> keys;
  String key;
  result=new Properties();
  keys=(Enumeration<String>)props.propertyNames();
  while (keys.hasMoreElements()) {
    key=keys.nextElement();
    result.setProperty(key,props.getProperty(key));
  }
  return result;
}

public static Properties collapse ( Properties props ) { Properties result ; Enumeration < String > keys ; String key ; result = new Properties ( ) ; keys = ( Enumeration < String > ) props . propertyNames ( ) ; while ( keys . hasMoreElements ( ) ) { key = keys . nextElement ( ) ; result . setProperty ( key , props . getProperty ( key ) ) ; } return result ; }
collapses all the inherited and current properties into a single properties object and returns it .
