In Spring I can define a HashSet like so in XML:
<bean id="subscriberStore" class="java.util.HashSet"/>
And, I can do the following in the code to create a concurrent hash set:
subscriberStore = Collections.newSetFromMap(
new ConcurrentHashMap<Subscriber, Boolean>());
But is there any way I can do this in one step in the XML? E.g. something like:
<bean id="subscriberStore" class="java.util.HashSet"/>
< Some code here to set subscriberStore to the result
of Collections.newSetFromMap(new ConcurrentHashMap<Subscriber, Boolean>? >
Many Thanks!