【发布时间】:2019-07-04 14:54:10
【问题描述】:
我有 2 个列表,我需要使用相同的列表将项目从一个列表传递到另一个列表 模型,在这种情况下,我们称之为回复。
每个回复都有一个uid,如果我提供的uid等于回复的uid,它应该把那个项目复制到currentReply列表中
List<Replies> allReplies; //All replies are here
List<Replies> currentReply; //Replies that meet criteria should be added here
String prov_uid = 123456;
Replies replies = getValue(Replies.class);
if (allReplies.equals(prov_uid))
{
currentReply.add()
}
【问题讨论】:
-
如果条件满足,循环
allReplies并添加到currentReply? -
发布回复shema。