Would it possible to create a class like this...
public class Container implements Serializable {
private final (Map<Object,Object> & Serializable) map;
public Container( (Map<Object,Object> & Serializable) map) {
super();
this.map = map;
}
....
}
Basically, we don't want to bind the map implementation to any class and make sure the implementation implements both Map and Serializable interface.
Many thanks for any idea and help.