kotlin beauty of simplicity



1, getLocalPermissions () the same logic

/ **
* Get account local rights group
* @param walletTable wallet
* @return permissions to the account permissions information publicKey | perm_name | weight
* /
Private Fun getLocalPermissions (walletTable: WalletTable): List <Triple <String, String, String >> {
Val = Permissions the ArrayList <Triple <String, String, String >> ()
Val = walletDatas walletTable.queryWalletData ()
walletDatas.forEach {
permissions.add (Triple (it.address, it.permission, it.weight))
}
return the permissions

}

/ **
* Gets account local rights group
* @param walletTable wallet
* @return permissions to the account permissions information publicKey | perm_name | weight
* /
private fun getLocalPermissions(walletTable: WalletTable) = walletTable.queryWalletData().map { Triple(it.address, it.permission, it.weight) }

Guess you like

Origin www.cnblogs.com/ggband/p/11871885.html