public static Map<Integer,Properties> collectProperties(Properties properties){
  Map<Integer,Properties> ret=new HashMap<Integer,Properties>();
  if (properties != null) {
    for (    String name : properties.stringPropertyNames()) {
      int index=getIndex(name);
      if (index >= 0) {
        Properties props=ret.get(index);
        if (props == null) {
          props=new Properties();
          ret.put(index,props);
        }
        String newName=dropToken(name);
        if (newName.length() > 0) {
          props.setProperty(newName,properties.getProperty(name));
        }
      }
    }
  }
  return ret;
}

public static Map < Integer , Properties > collectProperties ( Properties properties ) { Map < Integer , Properties > ret = new HashMap < Integer , Properties > ( ) ; if ( properties != null ) { for ( String name : properties . stringPropertyNames ( ) ) { int index = getIndex ( name ) ; if ( index >= 0 ) { Properties props = ret . get ( index ) ; if ( props == null ) { props = new Properties ( ) ; ret . put ( index , props ) ; } String newName = dropToken ( name ) ; if ( newName . length ( ) > 0 ) { props . setProperty ( newName , properties . getProperty ( name ) ) ; } } } } return ret ; }
collects properties by the leading index . this means that the name of the properties must start with an integer or else they are dropped .
