I have a class with the following constructor:
public UniqueField(Collection<Object> items) {
this.items=items;
}
The idea behind the Collection<Object>
is that I would be able to use Collection<OtherType>
.
When doing:
Collection<OtherType> collection=...
new UniqueField(collection);
I getting a compile error of invalid argument. How can I fix this?