question: public < T > T to ( Class < T > type ) throws Exception { T instance = type . newInstance ( ) ; for ( Pair < String , String > kv : entries ) setKV ( instance , kv . getKey ( ) , kv . getValue ( ) ) ; return instance ; }
target:  Converts an instance of KVFile to instance of the data structure and populates its fields with appropriate values.