我有一个方法,它的返回类型是列表,但是里面的方法根据某些条件创建 3 个不同的列表并提供这些列表,但最后由于该列表的返回类型我无法返回这 3 个不同的列表,因为在某些时候我需要访问这 3 个不同的列表,我认为这不是正确的方法,而是我想去一个地图,我将在其中创建一个键并将 3 个不同的列表与它们相关联,请告知
public List<ghjObject> getabcObjectslistcount(String abcIdentifier)
{
List<ghjObject> abcfulioaObjects = new ArrayList <ghjObject>();
List<ghjObject> deffulioaObjects = new ArrayList <ghjObject>();
List<ghjObject> exsettlement = new ArrayList <ghjObject>();
List<ghjObject> successfulabcsettlement = new ArrayList <ghjObject>();
List<ghjObject> abcFeedObjects = futuresFeedHome.getabcFeedObjects(abcIdentifier);
int failureabcfeed = 0;
int failuredefsettlement =0;
int sucessabcsettlement =0;
if (abcFeedObjects !=null && abcFeedObjects.size()>0)
{
for (ghjObject f : abcFeedObjects)
{
if ("INVALID".equalsIgnoreCase(f.getStatus()) )
{
deffulioaObjects.add(f) ;
failurecounterioafeed++;
}
abcfulioaObjects.add(f);
}
for (ghjObject f : abcfulioaObjects)
{
Settlement settlement = settlementHome.findByID(f.getSettlementId());
if ("ytrQueue".equalsIgnoreCase(settlement.getCurrentWFQueue()) || "yds".equalsIgnoreCase(settlement.getCurrentWFQueue()) )
exsettlement.add(f);
failuredefsettlement++;
if ("wgm".equalsIgnoreCase(settlement.getCurrentWFQueue()) || "yjm".equalsIgnoreCase(settlement.getCurrentWFQueue() ))
{
successfulabcsettlement.add(f);
sucessabcsettlement++;
}
}
}
return abcFeedObjects;
}
伙计们请基本上告诉我我正在寻找地图实施如果有人可以请告诉地图如何是有益的那将是一个伟大的请建议地图实施