/** * JsonObjectから{@link CombinedBattleEachBattle}を構築します * * @param json JsonObject * @return {@link CombinedBattleEachBattle} */ public static CombinedBattleEachBattle toBattle(JsonObject json) { CombinedBattleEachBattle bean = new CombinedBattleEachBattle(); JsonHelper.bind(json) .set( "api_air_base_injection", bean::setAirBaseInjection, BattleTypes.AirBaseAttack::toAirBaseAttack) .set( "api_air_base_attack", bean::setAirBaseAttack, JsonHelper.toList(BattleTypes.AirBaseAttack::toAirBaseAttack)) .setInteger("api_dock_id", bean::setDockId) .setInteger("api_deck_id", bean::setDockId) .set("api_ship_ke", bean::setShipKe, JsonHelper::toIntegerList) .set("api_ship_ke_combined", bean::setShipKeCombined, JsonHelper::toIntegerList) .set("api_ship_lv", bean::setShipLv, JsonHelper::toIntegerList) .set("api_ship_lv_combined", bean::setShipLvCombined, JsonHelper::toIntegerList) .set("api_nowhps", bean::setNowhps, JsonHelper::toIntegerList) .set("api_maxhps", bean::setMaxhps, JsonHelper::toIntegerList) .set("api_nowhps_combined", bean::setNowhpsCombined, JsonHelper::toIntegerList) .set("api_maxhps_combined", bean::setMaxhpsCombined, JsonHelper::toIntegerList) .setBoolean("api_midnight_flag", bean::setMidnightFlag) .set("api_eSlot", bean::setESlot, JsonHelper.toList(JsonHelper::toIntegerList)) .set( "api_eSlot_combined", bean::setESlotCombined, JsonHelper.toList(JsonHelper::toIntegerList)) .set("api_fParam", bean::setFParam, JsonHelper.toList(JsonHelper::toIntegerList)) .set("api_eParam", bean::setEParam, JsonHelper.toList(JsonHelper::toIntegerList)) .set( "api_fParam_combined", bean::setFParamCombined, JsonHelper.toList(JsonHelper::toIntegerList)) .set( "api_eParam_combined", bean::setEParamCombined, JsonHelper.toList(JsonHelper::toIntegerList)) .set("api_search", bean::setSearch, JsonHelper::toIntegerList) .set("api_formation", bean::setFormation, JsonHelper::toIntegerList) .set("api_stage_flag", bean::setStageFlag, JsonHelper::toIntegerList) .set("api_injection_kouku", bean::setInjectionKouku, BattleTypes.Kouku::toKouku) .set("api_kouku", bean::setKouku, BattleTypes.Kouku::toKouku) .setBoolean("api_support_flag", bean::setSupportFlag) .set("api_support_info", bean::setSupportInfo, BattleTypes.SupportInfo::toSupportInfo) .setBoolean("api_opening_flag", bean::setOpeningFlag) .set("api_opening_atack", bean::setOpeningAtack, BattleTypes.Raigeki::toRaigeki) .setBoolean("api_opening_taisen_flag", bean::setOpeningTaisenFlag) .set("api_opening_taisen", bean::setOpeningTaisen, BattleTypes.Hougeki::toHougeki) .set("api_hourai_flag", bean::setHouraiFlag, JsonHelper::toIntegerList) .set("api_hougeki1", bean::setHougeki1, BattleTypes.Hougeki::toHougeki) .set("api_raigeki", bean::setRaigeki, BattleTypes.Raigeki::toRaigeki) .set("api_hougeki2", bean::setHougeki2, BattleTypes.Hougeki::toHougeki) .set("api_hougeki3", bean::setHougeki3, BattleTypes.Hougeki::toHougeki); return bean; }
/** * api_data.api_slot_item * * @param array api_slot_item */ private void apiSlotItem(JsonArray array) { SlotItemCollection.get() .setSlotitemMap(JsonHelper.toMap(array, SlotItem::getId, SlotItem::toSlotItem)); }