I have a class CountryModel with two columns in it Name and Code and my problem is that I don't know how to search in this prognathically.
Say I want to search where country name is "Aruba" given the fact I got methods like getName()
ArrayList<CountryModel> countries = new ArrayList<>();
countries.add(new CountryModel("Afghanistan", "93"));
countries.add(new CountryModel("Australia", "61"));
countries.add(new CountryModel("Aruba", "297"));
Of course I know how to search a single column using the contains() function but this one has become uphill task for me.