public < T > Collection < T > getCollection ( String prefix , Function < String , T > factory ) { Collection < T > collection = new ArrayList <> ( ) ; for ( String property : properties . stringPropertyNames ( ) ) { if ( property . startsWith ( prefix + "." ) ) { collection . add ( factory . apply ( property ) ) ; } } return collection ; }
Reads a collection of properties based on a prefix .