@SuppressWarnings("unchecked") public T read(File file){
  Preconditions.checkNotNull(file);
  try (InputStream stream=new FileInputStream(file)){
    return (T)yamlParser.load(stream);
  }
 catch (  IOException e) {
    throw new RuntimeException("Could not load config file: " + file.getName(),e);
  }
}

@ SuppressWarnings ( "unchecked" ) public T read ( File file ) { Preconditions . checkNotNull ( file ) ; try ( InputStream stream = new FileInputStream ( file ) ) { return ( T ) yamlParser . load ( stream ) ; } catch ( IOException e ) { throw new RuntimeException ( "Could not load config file: " + file . getName ( ) , e ) ; } }
read a yaml file
