public static Wallet adaptAccountInfo ( List < BitflyerBalance > balances ) { List < Balance > adaptedBalances = new ArrayList <> ( balances . size ( ) ) ; for ( BitflyerBalance balance : balances ) { adaptedBalances . add ( new Balance ( Currency . getInstance ( balance . getCurrencyCode ( ) ) , balance . getAmount ( ) , balance . getAvailable ( ) ) ) ; } return new Wallet ( adaptedBalances ) ; }
Adapts a list of BitflyerBalance objects to Wallet .