//Offer Id を使用して特定のイベントのインデックスを見つける最良の方法は?
コア Java を使用するか、(Guava/Commons Collection) のようなサードパーティ ライブラリを使用しますか?
public class Event{
private String title;
//other attributes
private ArrayList<Offers> lOffers;
}
public class Offers{
private Sring Id;
private String offerName;
}
//Code
List<PayPerViewTitles> PayPerViewTitleList = someMethod();
/*
offerId -> Offers Object id property
**/
private int findEventPositionByOfferId(List<Event> eventList, String offerId){
// how to implement this method to find the Main Event using the
offer->id
}
このオブジェクトは、サーバーの JSON 応答をマップするために使用されます。