// them by SegmentType and ProductType-class
Map<SegmentType, Map<Class<? extends ProductType>, Set<Article>>> segmentTypes2PTClass2Articles = new HashMap<SegmentType, Map<Class<? extends ProductType>, Set<Article>>>();
Set<Article> articles = new HashSet<Article>();
for (Article recurringArticle : recurringOffer.getArticles()) {
SegmentType segmentType = recurringArticle.getSegment().getSegmentType();
Map<Class<? extends ProductType>, Set<Article>> ptClass2Articles = segmentTypes2PTClass2Articles.get(segmentType);
if (ptClass2Articles == null) {
ptClass2Articles = new HashMap<Class<? extends ProductType>, Set<Article>>();
segmentTypes2PTClass2Articles.put(segmentType, ptClass2Articles);
}