我需要允许用户存储/加载任意数量的对象列表(假设它们是可序列化的)。从概念上讲,我想要一个像这样的数据模型classFooBean{/*beanstuffhere*/}classFooList{finalprivateSetitems=newHashSet();publicbooleanadd(FooBeanitem){returnitems.add(item);}publicbooleanremove(FooBeanitem){returnitems.remove(item);}publicCollectiongetItems(){returnCollections.unmodifi