import StadiumModel from '@/Model/stadium' ; class StadiumParser { public static parse ( stadiums ) { stadiums . forEach ( ( stadium ) => { StadiumParser . stadiums . push ( new StadiumModel ( stadium . id , stadium . name , stadium . lat , stadium . lng ) ) ; } ) ; return this . stadiums ; } public static getStadium ( stadium ) { return StadiumParser . stadiums . find ( ( model ) => model . getId ( ) === stadium ) ; } private static stadiums : StadiumModel [ ] = [ ] ; } export default StadiumParser ;