0
我有以下构造函数的类:转换集合<MyType>到收藏<Object>
public UniqueField(Collection<Object> items) {
this.items=items;
}
的Collection<Object>
背后的想法是,我将能够使用Collection<OtherType>
。
在做:
Collection<OtherType> collection=...
new UniqueField(collection);
我越来越无效参数的编译错误。我怎样才能解决这个问题?