public Accounts getAccountsById(int id) { for (Accounts c : mAccounts) { if (c.getRoomname().equals(id)) return c; } return null; }
public Accounts getAccountsByRoomName(String roomname) { for (Accounts c : mAccounts) { if (c.getRoomname().equals(roomname)) return c; } return null; }