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;
}

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 ; }
converts an instance of kvfile to instance of the data structure and populates its fields with appropriate values .
